From 0abc5b4b27d54c571004ea11132054d58a304d99 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 8 Sep 2022 22:18:57 +0000 Subject: [PATCH] CodeGen from PR 20448 in Azure/azure-rest-api-specs Merge 1e5be819165c54519f52f9ef8cb0ed7040c5b3fe into b1aab39ec617152f2fed8714028edb824bc33ce5 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 1241 +++++++++++- .../pom.xml | 2 +- .../ContainerAppsApiManager.java | 121 +- .../fluent/CertificatesClient.java | 8 +- ...nnectedEnvironmentsCertificatesClient.java | 195 ++ .../fluent/ConnectedEnvironmentsClient.java | 308 +++ ...ectedEnvironmentsDaprComponentsClient.java | 193 ++ .../ConnectedEnvironmentsStoragesClient.java | 150 ++ .../fluent/ContainerAppsApiClient.java | 49 + .../fluent/ContainerAppsClient.java | 45 +- .../ContainerAppsDiagnosticsClient.java | 168 ++ .../fluent/DaprComponentsClient.java | 16 +- .../ManagedEnvironmentDiagnosticsClient.java | 86 + .../fluent/ManagedEnvironmentsClient.java | 105 +- .../ManagedEnvironmentsDiagnosticsClient.java | 48 + .../fluent/NamespacesClient.java | 8 +- .../fluent/models/AuthConfigProperties.java | 19 +- .../fluent/models/CertificateInner.java | 3 +- .../models/ConnectedEnvironmentInner.java | 176 ++ .../ConnectedEnvironmentProperties.java | 120 ++ .../ConnectedEnvironmentStorageInner.java | 67 + ...tedEnvironmentStoragesCollectionInner.java | 58 + .../models/ContainerAppAuthTokenInner.java | 89 + .../ContainerAppAuthTokenProperties.java | 51 + .../fluent/models/ContainerAppInner.java | 93 +- .../fluent/models/ContainerAppProperties.java | 73 +- .../CustomHostnameAnalysisResultInner.java | 137 +- ...ustomHostnameAnalysisResultProperties.java | 252 --- .../fluent/models/DaprComponentInner.java | 26 +- .../models/DaprComponentProperties.java | 26 + .../models/DiagnosticsCollectionInner.java | 73 + .../fluent/models/DiagnosticsInner.java | 67 + .../models/EnvironmentAuthTokenInner.java | 89 + .../EnvironmentAuthTokenProperties.java | 51 + .../models/ManagedEnvironmentInner.java | 91 +- .../models/ManagedEnvironmentProperties.java | 83 +- .../ManagedEnvironmentStorageInner.java | 3 +- .../fluent/models/ReplicaInner.java | 3 +- .../fluent/models/RevisionInner.java | 3 +- .../fluent/models/SourceControlInner.java | 3 +- .../CertificatesClientImpl.java | 26 +- .../ConnectedEnvironmentImpl.java | 210 ++ .../ConnectedEnvironmentStorageImpl.java | 153 ++ ...ctedEnvironmentStoragesCollectionImpl.java | 48 + ...tedEnvironmentsCertificatesClientImpl.java | 1177 ++++++++++++ ...ConnectedEnvironmentsCertificatesImpl.java | 156 ++ .../ConnectedEnvironmentsClientImpl.java | 1701 +++++++++++++++++ ...dEnvironmentsDaprComponentsClientImpl.java | 1122 +++++++++++ ...nnectedEnvironmentsDaprComponentsImpl.java | 154 ++ .../ConnectedEnvironmentsImpl.java | 249 +++ ...nnectedEnvironmentsStoragesClientImpl.java | 796 ++++++++ .../ConnectedEnvironmentsStoragesImpl.java | 221 +++ .../ContainerAppAuthTokenImpl.java | 70 + .../implementation/ContainerAppImpl.java | 41 + .../ContainerAppsApiClientBuilder.java | 34 +- .../ContainerAppsApiClientImpl.java | 100 +- .../ContainerAppsAuthConfigsClientImpl.java | 6 +- .../ContainerAppsClientImpl.java | 212 +- .../ContainerAppsDiagnosticsClientImpl.java | 1169 +++++++++++ .../ContainerAppsDiagnosticsImpl.java | 138 ++ .../implementation/ContainerAppsImpl.java | 26 + .../ContainerAppsRevisionsClientImpl.java | 6 +- ...ContainerAppsSourceControlsClientImpl.java | 8 +- .../CustomHostnameAnalysisResultImpl.java | 21 +- .../implementation/DaprComponentImpl.java | 9 + .../DaprComponentsClientImpl.java | 46 +- .../DiagnosticsCollectionImpl.java | 52 + .../implementation/DiagnosticsImpl.java | 50 + .../EnvironmentAuthTokenImpl.java | 70 + ...nagedEnvironmentDiagnosticsClientImpl.java | 419 ++++ .../ManagedEnvironmentDiagnosticsImpl.java | 87 + .../ManagedEnvironmentImpl.java | 52 + .../ManagedEnvironmentsClientImpl.java | 372 +++- ...agedEnvironmentsDiagnosticsClientImpl.java | 230 +++ .../ManagedEnvironmentsDiagnosticsImpl.java | 61 + .../ManagedEnvironmentsImpl.java | 26 + .../implementation/NamespacesClientImpl.java | 20 +- .../implementation/OperationsClientImpl.java | 6 +- .../appcontainers/models/AccessMode.java | 2 +- .../appcontainers/models/Action.java | 38 + .../models/ActiveRevisionsMode.java | 7 +- .../models/AllowedAudiencesValidation.java | 3 +- .../appcontainers/models/AppProtocol.java | 2 +- .../appcontainers/models/Apple.java | 4 +- .../appcontainers/models/AuthPlatform.java | 11 +- .../models/AzureActiveDirectory.java | 16 +- .../models/AzureActiveDirectoryLogin.java | 7 +- .../AzureActiveDirectoryRegistration.java | 37 +- .../AzureActiveDirectoryValidation.java | 6 +- .../models/AzureStaticWebApps.java | 4 +- .../appcontainers/models/BaseContainer.java | 212 ++ .../appcontainers/models/BindingType.java | 2 +- .../models/CertificateProperties.java | 16 + .../models/CertificateProvisioningState.java | 2 +- .../models/CheckNameAvailabilityReason.java | 2 +- .../models/ClientCredentialMethod.java | 6 +- .../appcontainers/models/Configuration.java | 38 +- .../models/ConnectedEnvironment.java | 322 ++++ .../ConnectedEnvironmentCollection.java | 66 + ...ConnectedEnvironmentProvisioningState.java | 60 + .../models/ConnectedEnvironmentStorage.java | 164 ++ ...ConnectedEnvironmentStorageProperties.java | 49 + ...onnectedEnvironmentStoragesCollection.java | 26 + .../models/ConnectedEnvironments.java | 241 +++ .../ConnectedEnvironmentsCertificates.java | 180 ++ .../ConnectedEnvironmentsDaprComponents.java | 177 ++ .../models/ConnectedEnvironmentsStorages.java | 155 ++ .../appcontainers/models/Container.java | 208 +- .../appcontainers/models/ContainerApp.java | 109 +- .../models/ContainerAppAuthToken.java | 76 + .../models/ContainerAppProbe.java | 42 +- .../models/ContainerAppProbeHttpGet.java | 7 +- .../models/ContainerAppProbeTcpSocket.java | 4 +- .../models/ContainerAppProvisioningState.java | 5 +- .../appcontainers/models/ContainerApps.java | 34 +- .../models/ContainerAppsDiagnostics.java | 153 ++ .../models/CookieExpiration.java | 3 +- .../models/CookieExpirationConvention.java | 6 +- .../appcontainers/models/CustomDomain.java | 3 +- .../models/CustomDomainConfiguration.java | 160 ++ .../models/CustomHostnameAnalysisResult.java | 31 +- ...ltCustomDomainVerificationFailureInfo.java | 96 + ...ainVerificationFailureInfoDetailsItem.java | 65 + .../models/CustomOpenIdConnectProvider.java | 9 +- .../appcontainers/models/Dapr.java | 114 +- .../appcontainers/models/DaprComponent.java | 29 + .../appcontainers/models/DaprComponents.java | 16 +- .../appcontainers/models/DaprMetadata.java | 3 +- .../models/DefaultAuthorizationPolicy.java | 6 +- .../DefaultErrorResponseErrorException.java | 1 + .../DiagnosticDataProviderMetadata.java | 77 + ...icDataProviderMetadataPropertyBagItem.java | 72 + .../DiagnosticDataTableResponseColumn.java | 98 + .../DiagnosticDataTableResponseObject.java | 102 + .../models/DiagnosticRendering.java | 124 ++ .../models/DiagnosticSupportTopic.java | 50 + .../appcontainers/models/Diagnostics.java | 53 + .../models/DiagnosticsCollection.java | 32 + .../models/DiagnosticsDataApiResponse.java | 78 + .../models/DiagnosticsDefinition.java | 181 ++ .../models/DiagnosticsProperties.java | 137 ++ .../models/DiagnosticsStatus.java | 72 + .../models/DnsVerificationTestResult.java | 6 +- .../models/EnvironmentAuthToken.java | 76 + .../models/EnvironmentProvisioningState.java | 2 +- .../models/EnvironmentSkuProperties.java | 54 + .../appcontainers/models/EnvironmentVar.java | 3 +- .../models/ExtendedLocation.java | 72 + .../models/ExtendedLocationTypes.java | 35 + .../appcontainers/models/Facebook.java | 7 +- .../models/ForwardProxyConvention.java | 6 +- .../appcontainers/models/GitHub.java | 7 +- .../models/GlobalValidation.java | 12 +- .../appcontainers/models/Google.java | 10 +- .../appcontainers/models/HttpScaleRule.java | 2 +- .../appcontainers/models/HttpSettings.java | 4 +- .../models/HttpSettingsRoutes.java | 3 +- .../models/IdentityProviders.java | 3 +- .../appcontainers/models/Ingress.java | 59 +- .../models/IngressTransportMethod.java | 5 +- .../appcontainers/models/InitContainer.java | 71 + .../models/IpSecurityRestrictionRule.java | 148 ++ .../appcontainers/models/LogLevel.java | 44 + .../appcontainers/models/Login.java | 14 +- .../models/ManagedEnvironment.java | 152 +- .../models/ManagedEnvironmentDiagnostics.java | 78 + .../ManagedEnvironmentOutBoundType.java | 38 + .../ManagedEnvironmentOutboundSettings.java | 74 + .../models/ManagedEnvironments.java | 86 +- .../ManagedEnvironmentsDiagnostics.java | 42 + .../models/ManagedServiceIdentity.java | 16 +- .../models/ManagedServiceIdentityType.java | 2 +- .../appcontainers/models/Namespaces.java | 8 +- .../appcontainers/models/Nonce.java | 4 +- .../models/OpenIdConnectClientCredential.java | 3 +- .../models/OpenIdConnectConfig.java | 3 +- .../models/OpenIdConnectRegistration.java | 3 +- .../models/RegistryCredentials.java | 5 +- .../models/ReplicaContainer.java | 30 + .../models/RevisionHealthState.java | 2 +- .../models/RevisionProvisioningState.java | 2 +- .../appcontainers/models/Scale.java | 3 +- .../appcontainers/models/ScaleRule.java | 29 + .../appcontainers/models/Scheme.java | 2 +- .../appcontainers/models/SkuName.java | 38 + .../models/SourceControlOperationState.java | 2 +- .../appcontainers/models/StorageType.java | 2 +- .../appcontainers/models/TcpScaleRule.java | 79 + .../appcontainers/models/Template.java | 29 + .../appcontainers/models/Twitter.java | 7 +- .../models/TwitterRegistration.java | 3 +- .../appcontainers/models/Type.java | 2 +- .../models/UnauthenticatedClientActionV2.java | 6 +- .../models/VnetConfiguration.java | 67 +- .../appcontainers/models/VolumeMount.java | 3 +- .../appcontainers/models/WorkloadProfile.java | 107 ++ .../CertificatesCreateOrUpdateSamples.java | 2 +- .../generated/CertificatesDeleteSamples.java | 2 +- .../generated/CertificatesGetSamples.java | 2 +- .../generated/CertificatesListSamples.java | 2 +- .../generated/CertificatesUpdateSamples.java | 2 +- ...entsCertificatesCreateOrUpdateSamples.java | 37 + ...EnvironmentsCertificatesDeleteSamples.java | 24 + ...tedEnvironmentsCertificatesGetSamples.java | 24 + ...edEnvironmentsCertificatesListSamples.java | 23 + ...EnvironmentsCertificatesUpdateSamples.java | 43 + ...ironmentsCheckNameAvailabilitySamples.java | 32 + ...ctedEnvironmentsCreateOrUpdateSamples.java | 28 + ...tsDaprComponentsCreateOrUpdateSamples.java | 47 + ...vironmentsDaprComponentsDeleteSamples.java | 24 + ...dEnvironmentsDaprComponentsGetSamples.java | 24 + ...EnvironmentsDaprComponentsListSamples.java | 22 + ...mentsDaprComponentsListSecretsSamples.java | 25 + .../ConnectedEnvironmentsDeleteSamples.java | 23 + ...EnvironmentsGetByResourceGroupSamples.java | 23 + ...nvironmentsListByResourceGroupSamples.java | 23 + .../ConnectedEnvironmentsListSamples.java | 23 + ...ronmentsStoragesCreateOrUpdateSamples.java | 37 + ...ctedEnvironmentsStoragesDeleteSamples.java | 23 + ...nnectedEnvironmentsStoragesGetSamples.java | 23 + ...nectedEnvironmentsStoragesListSamples.java | 23 + .../ConnectedEnvironmentsUpdateSamples.java | 23 + ...rAppsAuthConfigsCreateOrUpdateSamples.java | 2 +- ...ContainerAppsAuthConfigsDeleteSamples.java | 2 +- .../ContainerAppsAuthConfigsGetSamples.java | 2 +- ...sAuthConfigsListByContainerAppSamples.java | 2 +- .../ContainerAppsCreateOrUpdateSamples.java | 111 +- .../generated/ContainerAppsDeleteSamples.java | 2 +- ...inerAppsDiagnosticsGetDetectorSamples.java | 26 + ...inerAppsDiagnosticsGetRevisionSamples.java | 25 + ...ontainerAppsDiagnosticsGetRootSamples.java | 22 + ...erAppsDiagnosticsListDetectorsSamples.java | 25 + ...erAppsDiagnosticsListRevisionsSamples.java | 23 + .../ContainerAppsGetAuthTokenSamples.java | 23 + ...ontainerAppsGetByResourceGroupSamples.java | 2 +- ...ntainerAppsListByResourceGroupSamples.java | 2 +- ...AppsListCustomHostnameAnalysisSamples.java | 2 +- .../generated/ContainerAppsListSamples.java | 2 +- .../ContainerAppsListSecretsSamples.java | 2 +- ...AppsRevisionReplicasGetReplicaSamples.java | 2 +- ...psRevisionReplicasListReplicasSamples.java | 2 +- ...rAppsRevisionsActivateRevisionSamples.java | 2 +- ...ppsRevisionsDeactivateRevisionSamples.java | 2 +- ...tainerAppsRevisionsGetRevisionSamples.java | 2 +- ...inerAppsRevisionsListRevisionsSamples.java | 2 +- ...erAppsRevisionsRestartRevisionSamples.java | 2 +- ...psSourceControlsCreateOrUpdateSamples.java | 2 +- ...tainerAppsSourceControlsDeleteSamples.java | 2 +- ...ContainerAppsSourceControlsGetSamples.java | 2 +- ...urceControlsListByContainerAppSamples.java | 2 +- .../generated/ContainerAppsUpdateSamples.java | 44 +- .../DaprComponentsCreateOrUpdateSamples.java | 36 +- .../DaprComponentsDeleteSamples.java | 2 +- .../generated/DaprComponentsGetSamples.java | 20 +- .../generated/DaprComponentsListSamples.java | 2 +- .../DaprComponentsListSecretsSamples.java | 2 +- ...ironmentDiagnosticsGetDetectorSamples.java | 26 + ...onmentDiagnosticsListDetectorsSamples.java | 25 + ...agedEnvironmentsCreateOrUpdateSamples.java | 37 +- .../ManagedEnvironmentsDeleteSamples.java | 2 +- ...EnvironmentsDiagnosticsGetRootSamples.java | 22 + ...anagedEnvironmentsGetAuthTokenSamples.java | 23 + ...EnvironmentsGetByResourceGroupSamples.java | 2 +- ...nvironmentsListByResourceGroupSamples.java | 2 +- .../ManagedEnvironmentsListSamples.java | 2 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 2 +- ...agedEnvironmentsStoragesDeleteSamples.java | 2 +- ...ManagedEnvironmentsStoragesGetSamples.java | 2 +- ...anagedEnvironmentsStoragesListSamples.java | 2 +- .../ManagedEnvironmentsUpdateSamples.java | 2 +- ...amespacesCheckNameAvailabilitySamples.java | 4 +- .../generated/OperationsListSamples.java | 2 +- 274 files changed, 19457 insertions(+), 1119 deletions(-) create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java create 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/CustomHostnameAnalysisResultProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 60c849290ef04..5a2ea2d6f13f3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2022-09-08) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index c456e0cf3e79f..a02875ec8d5db 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ContainerAppsApi client library for Java. -This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-appcontainers - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index a863135771ff8..bcf093347ae81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -9,10 +9,44 @@ - [List](#certificates_list) - [Update](#certificates_update) +## ConnectedEnvironments + +- [CheckNameAvailability](#connectedenvironments_checknameavailability) +- [CreateOrUpdate](#connectedenvironments_createorupdate) +- [Delete](#connectedenvironments_delete) +- [GetByResourceGroup](#connectedenvironments_getbyresourcegroup) +- [List](#connectedenvironments_list) +- [ListByResourceGroup](#connectedenvironments_listbyresourcegroup) +- [Update](#connectedenvironments_update) + +## ConnectedEnvironmentsCertificates + +- [CreateOrUpdate](#connectedenvironmentscertificates_createorupdate) +- [Delete](#connectedenvironmentscertificates_delete) +- [Get](#connectedenvironmentscertificates_get) +- [List](#connectedenvironmentscertificates_list) +- [Update](#connectedenvironmentscertificates_update) + +## ConnectedEnvironmentsDaprComponents + +- [CreateOrUpdate](#connectedenvironmentsdaprcomponents_createorupdate) +- [Delete](#connectedenvironmentsdaprcomponents_delete) +- [Get](#connectedenvironmentsdaprcomponents_get) +- [List](#connectedenvironmentsdaprcomponents_list) +- [ListSecrets](#connectedenvironmentsdaprcomponents_listsecrets) + +## ConnectedEnvironmentsStorages + +- [CreateOrUpdate](#connectedenvironmentsstorages_createorupdate) +- [Delete](#connectedenvironmentsstorages_delete) +- [Get](#connectedenvironmentsstorages_get) +- [List](#connectedenvironmentsstorages_list) + ## ContainerApps - [CreateOrUpdate](#containerapps_createorupdate) - [Delete](#containerapps_delete) +- [GetAuthToken](#containerapps_getauthtoken) - [GetByResourceGroup](#containerapps_getbyresourcegroup) - [List](#containerapps_list) - [ListByResourceGroup](#containerapps_listbyresourcegroup) @@ -27,6 +61,14 @@ - [Get](#containerappsauthconfigs_get) - [ListByContainerApp](#containerappsauthconfigs_listbycontainerapp) +## ContainerAppsDiagnostics + +- [GetDetector](#containerappsdiagnostics_getdetector) +- [GetRevision](#containerappsdiagnostics_getrevision) +- [GetRoot](#containerappsdiagnostics_getroot) +- [ListDetectors](#containerappsdiagnostics_listdetectors) +- [ListRevisions](#containerappsdiagnostics_listrevisions) + ## ContainerAppsRevisionReplicas - [GetReplica](#containerappsrevisionreplicas_getreplica) @@ -55,15 +97,25 @@ - [List](#daprcomponents_list) - [ListSecrets](#daprcomponents_listsecrets) +## ManagedEnvironmentDiagnostics + +- [GetDetector](#managedenvironmentdiagnostics_getdetector) +- [ListDetectors](#managedenvironmentdiagnostics_listdetectors) + ## ManagedEnvironments - [CreateOrUpdate](#managedenvironments_createorupdate) - [Delete](#managedenvironments_delete) +- [GetAuthToken](#managedenvironments_getauthtoken) - [GetByResourceGroup](#managedenvironments_getbyresourcegroup) - [List](#managedenvironments_list) - [ListByResourceGroup](#managedenvironments_listbyresourcegroup) - [Update](#managedenvironments_update) +## ManagedEnvironmentsDiagnostics + +- [GetRoot](#managedenvironmentsdiagnostics_getroot) + ## ManagedEnvironmentsStorages - [CreateOrUpdate](#managedenvironmentsstorages_createorupdate) @@ -86,7 +138,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -117,7 +169,7 @@ import com.azure.core.util.Context; /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -140,7 +192,7 @@ import com.azure.core.util.Context; /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -163,7 +215,7 @@ import com.azure.core.util.Context; /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -188,7 +240,7 @@ import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -217,9 +269,563 @@ public final class CertificatesUpdateSamples { } ``` +### ConnectedEnvironments_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; + +/** Samples for ConnectedEnvironments CheckNameAvailability. */ +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + */ + /** + * Sample code: Certificates_CheckNameAvailability. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void certificatesCheckNameAvailability( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironments() + .checkNameAvailabilityWithResponse( + "examplerg", + "testcontainerenv", + new CheckNameAvailabilityRequest() + .withName("testcertificatename") + .withType("Microsoft.App/connectedEnvironments/certificates"), + Context.NONE); + } +} +``` + +### ConnectedEnvironments_CreateOrUpdate + +```java +/** Samples for ConnectedEnvironments CreateOrUpdate. */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + */ + /** + * Sample code: Create kube environments. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironments() + .define("testenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .create(); + } +} +``` + +### ConnectedEnvironments_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Delete. */ +public final class ConnectedEnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json + */ + /** + * Sample code: Delete connected environment by connectedEnvironmentName. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().delete("examplerg", "examplekenv", Context.NONE); + } +} +``` + +### ConnectedEnvironments_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments GetByResourceGroup. */ +public final class ConnectedEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json + */ + /** + * Sample code: Get connected environment by connectedEnvironmentName. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", Context.NONE); + } +} +``` + +### ConnectedEnvironments_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments List. */ +public final class ConnectedEnvironmentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + */ + /** + * Sample code: List connected environments by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listConnectedEnvironmentsBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().list(Context.NONE); + } +} +``` + +### ConnectedEnvironments_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments ListByResourceGroup. */ +public final class ConnectedEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + */ + /** + * Sample code: List environments by resource group. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsByResourceGroup( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().listByResourceGroup("examplerg", Context.NONE); + } +} +``` + +### ConnectedEnvironments_Update + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Update. */ +public final class ConnectedEnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json + */ + /** + * Sample code: Patch Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; + +/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ +public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("private key password") + .withValue("PFX-or-PEM-blob".getBytes())), + Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Delete. */ +public final class ConnectedEnvironmentsCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Get. */ +public final class ConnectedEnvironmentsCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates List. */ +public final class ConnectedEnvironmentsCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + */ + /** + * Sample code: List Certificates by Connected Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listCertificatesByConnectedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ConnectedEnvironmentsCertificates Update. */ +public final class ConnectedEnvironmentsCertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ConnectedEnvironmentsDaprComponents_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; +import java.util.Arrays; + +/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ +public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + */ + /** + * Sample code: Create or update dapr component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ +public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + */ + /** + * Sample code: Delete dapr component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Get. */ +public final class ConnectedEnvironmentsDaprComponentsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + */ + /** + * Sample code: Get Dapr Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents List. */ +public final class ConnectedEnvironmentsDaprComponentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + */ + /** + * Sample code: List Dapr Components. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_ListSecrets + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ +public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + */ + /** + * Sample code: List Container Apps Secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listContainerAppsSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsStorages_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.AccessMode; +import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; + +/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ +public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + */ + /** + * Sample code: Create or update environments storage. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateEnvironmentsStorage( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsStorages() + .define("jlaw-demo1") + .withExistingConnectedEnvironment("examplerg", "env") + .withProperties( + new ConnectedEnvironmentStorageProperties() + .withAzureFile( + new AzureFileProperties() + .withAccountName("account1") + .withAccountKey("key") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) + .create(); + } +} +``` + +### ConnectedEnvironmentsStorages_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages Delete. */ +public final class ConnectedEnvironmentsStoragesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + */ + /** + * Sample code: List environments storages by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsStorages_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages Get. */ +public final class ConnectedEnvironmentsStoragesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + */ + /** + * Sample code: get a environments storage properties by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAEnvironmentsStoragePropertiesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsStorages_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages List. */ +public final class ConnectedEnvironmentsStoragesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json + */ + /** + * Sample code: List environments storages by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); + } +} +``` + ### ContainerApps_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -227,12 +833,19 @@ import com.azure.resourcemanager.appcontainers.models.Container; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; @@ -240,24 +853,142 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for ContainerApps CreateOrUpdate. */ -public final class ContainerAppsCreateOrUpdateSamples { +/** Samples for ContainerApps CreateOrUpdate. */ +public final class ContainerAppsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileType("GeneralPurpose") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains( + Arrays + .asList( + new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain() + .withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) + .withTemplate( + new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withHttpGet( + new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays + .asList( + new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule() + .withType("http") + .withMetadata(mapOf("concurrentRequests", "50"))))))) + .create(); + } + /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** - * Sample code: Create or Update Container App. + * Sample code: Create or Update Tcp App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerApps() - .define("testcontainerApp0") + .define("testcontainerAppTcp") .withRegion("East US") .withExistingResourceGroup("rg") - .withManagedEnvironmentId( + .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( new Configuration() @@ -265,51 +996,29 @@ public final class ContainerAppsCreateOrUpdateSamples { new Ingress() .withExternal(true) .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) .withTraffic( Arrays .asList( new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + .withRevisionName("testcontainerAppTcp-ab1234") + .withWeight(100))))) .withTemplate( new Template() .withContainers( Arrays .asList( new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") + .withImage("repo/testcontainerAppTcp:v1") + .withName("testcontainerAppTcp") .withProbes( Arrays .asList( new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) .withInitialDelaySeconds(3) .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) .withType(Type.LIVENESS))))) .withScale( new Scale() @@ -319,11 +1028,10 @@ public final class ContainerAppsCreateOrUpdateSamples { Arrays .asList( new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) + .withName("tcpscalingrule") + .withTcp( + new TcpScaleRule() + .withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } @@ -348,7 +1056,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -361,6 +1069,28 @@ public final class ContainerAppsDeleteSamples { } ``` +### ContainerApps_GetAuthToken + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps GetAuthToken. */ +public final class ContainerAppsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json + */ + /** + * Sample code: Get Container App Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} +``` + ### ContainerApps_GetByResourceGroup ```java @@ -369,7 +1099,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -390,7 +1120,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -412,7 +1142,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -434,7 +1164,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -457,7 +1187,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -476,6 +1206,7 @@ public final class ContainerAppsListSecretsSamples { ```java import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -483,10 +1214,14 @@ import com.azure.resourcemanager.appcontainers.models.Container; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; @@ -499,7 +1234,7 @@ import java.util.Map; /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -540,10 +1275,43 @@ public final class ContainerAppsUpdateSamples { .withName("www.my-other-name.com") .withBindingType(BindingType.SNI_ENABLED) .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) .withTemplate( new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers( Arrays .asList( @@ -609,7 +1377,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -644,7 +1412,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -668,7 +1436,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -692,7 +1460,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -706,6 +1474,122 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { } ``` +### ContainerAppsDiagnostics_GetDetector + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetDetector. */ +public final class ContainerAppsDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json + */ + /** + * Sample code: Get Container App's diagnostics info. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppSDiagnosticsInfo( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsDiagnostics() + .getDetectorWithResponse( + "mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetRevision + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRevision. */ +public final class ContainerAppsDiagnosticsGetRevisionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + */ + /** + * Sample code: Get Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppSRevision( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsDiagnostics() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetRoot + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRoot. */ +public final class ContainerAppsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + */ + /** + * Sample code: Get Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListDetectors + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListDetectors. */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json + */ + /** + * Sample code: Get the list of available diagnostics for a given Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsDiagnostics() + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListRevisions + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListRevisions. */ +public final class ContainerAppsDiagnosticsListRevisionsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listContainerAppSRevisions( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, Context.NONE); + } +} +``` + ### ContainerAppsRevisionReplicas_GetReplica ```java @@ -714,7 +1598,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -739,7 +1623,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -763,7 +1647,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -787,7 +1671,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -811,7 +1695,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -835,7 +1719,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -857,7 +1741,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -883,7 +1767,7 @@ import com.azure.resourcemanager.appcontainers.models.RegistryInfo; /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -925,7 +1809,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -947,7 +1831,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -971,7 +1855,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -994,14 +1878,14 @@ import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** - * Sample code: Create or update dapr component. + * Sample code: Create or update dapr component with secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponent( + public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() @@ -1022,6 +1906,36 @@ public final class DaprComponentsCreateOrUpdateSamples { .withScopes(Arrays.asList("container-app-1", "container-app-2")) .create(); } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + */ + /** + * Sample code: Create or update dapr component with secret store component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .daprComponents() + .define("reddog") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("my-secret-store") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); + } } ``` @@ -1033,7 +1947,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -1054,14 +1968,28 @@ import com.azure.core.util.Context; /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** - * Sample code: Get Dapr Component. + * Sample code: Get Dapr Component with secret store component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void getDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + */ + /** + * Sample code: Get Dapr Component with secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprComponentWithSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); } } @@ -1075,7 +2003,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -1096,7 +2024,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1110,16 +2038,73 @@ public final class DaprComponentsListSecretsSamples { } ``` +### ManagedEnvironmentDiagnostics_GetDetector + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ +public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + */ + /** + * Sample code: Get diagnostic data for a managed environments. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDiagnosticDataForAManagedEnvironments( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedEnvironmentDiagnostics() + .getDetectorWithResponse( + "mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", Context.NONE); + } +} +``` + +### ManagedEnvironmentDiagnostics_ListDetectors + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ +public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + */ + /** + * Sample code: Get the list of available diagnostic data for a managed environments. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedEnvironmentDiagnostics() + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", Context.NONE); + } +} +``` + ### ManagedEnvironments_CreateOrUpdate ```java import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; +import com.azure.resourcemanager.appcontainers.models.SkuName; +import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; +import java.util.Arrays; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -1132,13 +2117,40 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .define("testcontainerenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withVnetConfiguration( + new VnetConfiguration() + .withOutboundSettings( + new ManagedEnvironmentOutboundSettings() + .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) + .withVirtualNetworkApplianceIp("192.168.1.20"))) .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) .withZoneRedundant(true) + .withCustomDomainConfiguration( + new CustomDomainConfiguration() + .withDnsSuffix("www.my-name.com") + .withCertificateValue("PFX-or-PEM-blob".getBytes()) + .withCertificatePassword("private key password".getBytes())) + .withWorkloadProfiles( + Arrays + .asList( + new WorkloadProfile() + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile() + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile() + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6))) .create(); } } @@ -1152,7 +2164,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -1166,6 +2178,28 @@ public final class ManagedEnvironmentsDeleteSamples { } ``` +### ManagedEnvironments_GetAuthToken + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironments GetAuthToken. */ +public final class ManagedEnvironmentsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json + */ + /** + * Sample code: Get Managed Environment Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getManagedEnvironmentAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", Context.NONE); + } +} +``` + ### ManagedEnvironments_GetByResourceGroup ```java @@ -1174,7 +2208,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -1195,7 +2229,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -1217,7 +2251,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -1242,7 +2276,7 @@ import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -1275,6 +2309,27 @@ public final class ManagedEnvironmentsUpdateSamples { } ``` +### ManagedEnvironmentsDiagnostics_GetRoot + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ +public final class ManagedEnvironmentsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + */ + /** + * Sample code: Get environments by name. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", Context.NONE); + } +} +``` + ### ManagedEnvironmentsStorages_CreateOrUpdate ```java @@ -1285,7 +2340,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageP /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -1319,7 +2374,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -1341,7 +2396,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -1363,7 +2418,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -1386,7 +2441,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -1407,7 +2462,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -1435,7 +2490,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index a2f7abb2a8cae..48a1dfdbee053 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-03. + This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2022-06. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java index 2cda5dd69c19a..699fbe3fb96e2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java @@ -25,25 +25,39 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; 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.ContainerAppsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; +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.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.ContainerAppsDiagnostics; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; import com.azure.resourcemanager.appcontainers.models.DaprComponents; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; 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; @@ -66,6 +80,12 @@ public final class ContainerAppsApiManager { private DaprComponents daprComponents; + private ContainerAppsDiagnostics containerAppsDiagnostics; + + private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; + + private ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics; + private Operations operations; private ManagedEnvironments managedEnvironments; @@ -78,6 +98,14 @@ public final class ContainerAppsApiManager { private ContainerAppsSourceControls containerAppsSourceControls; + private ConnectedEnvironments connectedEnvironments; + + private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; + + private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; + + private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; + private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -243,7 +271,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -363,6 +391,45 @@ public DaprComponents daprComponents() { return daprComponents; } + /** + * 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 Operations. * @@ -437,6 +504,58 @@ public ContainerAppsSourceControls containerAppsSourceControls() { return containerAppsSourceControls; } + /** + * 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. + * + * @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. + * + * @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; + } + /** * @return Wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java index 32178bc86902a..650fb77a11cc5 100644 --- 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 @@ -145,7 +145,9 @@ Response deleteWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context); /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. @@ -162,7 +164,9 @@ CertificateInner update( String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. 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 new file mode 100644 index 0000000000000..6306b6f23e804 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java @@ -0,0 +1,195 @@ +// Copyright (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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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 new file mode 100644 index 0000000000000..48d95ec51e137 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if 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); + + /** + * 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); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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 new file mode 100644 index 0000000000000..24c729b87eb9a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java @@ -0,0 +1,193 @@ +// Copyright (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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprSecretsCollectionInner listSecrets( + 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 ARM resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); +} 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 new file mode 100644 index 0000000000000..637b4b0b548ab --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java @@ -0,0 +1,150 @@ +// Copyright (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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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 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 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java index 21fe87e369a87..ef1b6e2ece496 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java @@ -79,6 +79,27 @@ public interface ContainerAppsApiClient { */ DaprComponentsClient getDaprComponents(); + /** + * 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 OperationsClient object to access its operations. * @@ -120,4 +141,32 @@ public interface ContainerAppsApiClient { * @return the ContainerAppsSourceControlsClient object. */ ContainerAppsSourceControlsClient getContainerAppsSourceControls(); + + /** + * 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(); } 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 index 5ee0e85fc0d87..58e2d1c793552 100644 --- 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 @@ -11,6 +11,7 @@ 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; @@ -219,7 +220,9 @@ ContainerAppInner createOrUpdate( void delete(String resourceGroupName, String containerAppName, Context context); /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -235,7 +238,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -252,7 +257,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -266,7 +273,9 @@ SyncPoller, Void> beginUpdate( void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -341,4 +350,32 @@ Response listCustomHostnameAnalysisWithRespon @ServiceMethod(returns = ReturnType.SINGLE) Response listSecretsWithResponse( 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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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); + + /** + * 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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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); } 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 new file mode 100644 index 0000000000000..6e08aadf69272 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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 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 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.core.management.exception.ManagementException thrown if 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner getRoot(String resourceGroupName, String containerAppName); + + /** + * 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.core.management.exception.ManagementException thrown if 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); +} 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 index 5a659b7517d82..6ba1036ec56be 100644 --- 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 @@ -76,7 +76,9 @@ Response getWithResponse( String resourceGroupName, String environmentName, String componentName, Context context); /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -96,7 +98,9 @@ DaprComponentInner createOrUpdate( DaprComponentInner daprComponentEnvelope); /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -118,7 +122,9 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -132,7 +138,9 @@ Response createOrUpdateWithResponse( void delete(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component from a Managed Environment. + * 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. 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 new file mode 100644 index 0000000000000..558409a4d4c41 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 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 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); + + /** + * 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); +} 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 index 338dd07ce2e96..1a766eff125a0 100644 --- 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 @@ -11,12 +11,15 @@ 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; /** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ public interface ManagedEnvironmentsClient { /** - * Get all Managed Environments for a subscription. + * 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. @@ -27,7 +30,9 @@ public interface ManagedEnvironmentsClient { PagedIterable list(); /** - * Get all Managed Environments for a subscription. + * 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. @@ -40,7 +45,9 @@ public interface ManagedEnvironmentsClient { PagedIterable list(Context context); /** - * Get all the Managed Environments in a resource group. + * 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. @@ -53,7 +60,9 @@ public interface ManagedEnvironmentsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get all the Managed Environments in a resource group. + * 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. @@ -67,7 +76,9 @@ public interface ManagedEnvironmentsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -81,7 +92,9 @@ public interface ManagedEnvironmentsClient { ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName); /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -97,7 +110,9 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String environmentName, Context context); /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -113,7 +128,9 @@ SyncPoller, ManagedEnvironmentInner> beginCr String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -130,7 +147,9 @@ SyncPoller, ManagedEnvironmentInner> beginCr String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -146,7 +165,9 @@ ManagedEnvironmentInner createOrUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -163,7 +184,9 @@ ManagedEnvironmentInner createOrUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -177,7 +200,9 @@ ManagedEnvironmentInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -192,7 +217,9 @@ ManagedEnvironmentInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -205,7 +232,9 @@ ManagedEnvironmentInner createOrUpdate( void delete(String resourceGroupName, String environmentName); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -219,7 +248,9 @@ ManagedEnvironmentInner createOrUpdate( void delete(String resourceGroupName, String environmentName, Context context); /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -235,7 +266,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -252,7 +285,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -266,7 +301,9 @@ SyncPoller, Void> beginUpdate( void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -280,4 +317,36 @@ SyncPoller, Void> beginUpdate( @ServiceMethod(returns = ReturnType.SINGLE) void 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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.core.management.exception.ManagementException 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); } 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 new file mode 100644 index 0000000000000..ea0cb95326bf4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if 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); + + /** + * 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); +} 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 index 1a0dc5841f94b..50960ffcbc3b5 100644 --- 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 @@ -14,7 +14,9 @@ /** An instance of this class provides access to all the operations defined in NamespacesClient. */ public interface NamespacesClient { /** - * Checks if resource name is available. + * 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. @@ -30,7 +32,9 @@ CheckNameAvailabilityResponseInner checkNameAvailability( String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); /** - * Checks if resource name is available. + * 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. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java index 84c4c35a50198..f693d5b9037ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java @@ -16,37 +16,34 @@ @Fluent public final class AuthConfigProperties { /* - * The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. + * The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "platform") private AuthPlatform platform; /* - * The configuration settings that determines the validation flow of users - * using Service Authentication/Authorization. + * The configuration settings that determines the validation flow of users using Service + * Authentication/Authorization. */ @JsonProperty(value = "globalValidation") private GlobalValidation globalValidation; /* - * The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. + * The configuration settings of each of the identity providers used to configure ContainerApp Service + * Authentication/Authorization. */ @JsonProperty(value = "identityProviders") private IdentityProviders identityProviders; /* - * The configuration settings of the login flow of users using ContainerApp - * Service Authentication/Authorization. + * The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "login") private Login login; /* - * The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service - * Authentication/Authorization. + * The configuration settings of the HTTP requests for authentication and authorization requests made against + * ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "httpSettings") private HttpSettings httpSettings; 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 index af4a68117d002..9fa25b27dbf49 100644 --- 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 @@ -21,8 +21,7 @@ public final class CertificateInner extends Resource { private CertificateProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 new file mode 100644 index 0000000000000..825f98399001b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.fasterxml.jackson.annotation.JsonProperty; +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. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * ConnectedEnvironment resource specific properties + */ + @JsonProperty(value = "properties") + private ConnectedEnvironmentProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** {@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; + } + + /** + * 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(); + } + } +} 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 new file mode 100644 index 0000000000000..f5a615055b4f9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ConnectedEnvironment resource specific properties. */ +@Fluent +public final class ConnectedEnvironmentProperties { + /* + * Provisioning state of the Kubernetes Environment. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ConnectedEnvironmentProvisioningState provisioningState; + + /* + * Any errors that occurred during deployment or deployment validation + */ + @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY) + private String deploymentErrors; + + /* + * Default Domain Name for the cluster + */ + @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDomain; + + /* + * Static IP of the connectedEnvironment + */ + @JsonProperty(value = "staticIp") + private String staticIp; + + /* + * Application Insights connection string used by Dapr to export Service to Service communication telemetry + */ + @JsonProperty(value = "daprAIConnectionString") + private String daprAIConnectionString; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java new file mode 100644 index 0000000000000..2ee1d74dd5e72 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage resource for connectedEnvironment. */ +@Fluent +public final class ConnectedEnvironmentStorageInner extends ProxyResource { + /* + * Storage properties + */ + @JsonProperty(value = "properties") + private ConnectedEnvironmentStorageProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java new file mode 100644 index 0000000000000..f152f04bf1716 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Storage for Environments. */ +@Fluent +public final class ConnectedEnvironmentStoragesCollectionInner { + /* + * Collection of storage resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model ConnectedEnvironmentStoragesCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentStoragesCollectionInner.class); +} 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 new file mode 100644 index 0000000000000..e68c5b466a12b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; +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 + */ + @JsonProperty(value = "properties") + private ContainerAppAuthTokenProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** {@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(); + } + } +} 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 new file mode 100644 index 0000000000000..88805794270ef --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Container App auth token resource specific properties. */ +@Immutable +public final class ContainerAppAuthTokenProperties { + /* + * Auth token value. + */ + @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) + private String token; + + /* + * Token expiration date. + */ + @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expires; + + /** + * 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() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java index 89661084471e9..1c9873940d645 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java @@ -8,6 +8,7 @@ import com.azure.core.management.Resource; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,8 +19,14 @@ @Fluent public final class ContainerAppInner extends Resource { /* - * managed identities for the Container App to interact with other Azure - * services without maintaining any secrets or credentials in code. + * The complex type of the extended location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * managed identities for the Container App to interact with other Azure services without maintaining any secrets + * or credentials in code. */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; @@ -30,6 +37,26 @@ public final class ContainerAppInner extends Resource { @JsonProperty(value = "properties") private ContainerAppProperties innerProperties; + /** + * 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. @@ -85,7 +112,7 @@ public ContainerAppProvisioningState provisioningState() { } /** - * Get the managedEnvironmentId property: Resource ID of the Container App's environment. + * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. * * @return the managedEnvironmentId value. */ @@ -94,7 +121,7 @@ public String managedEnvironmentId() { } /** - * Set the managedEnvironmentId property: Resource ID of the Container App's environment. + * 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. @@ -107,6 +134,52 @@ public ContainerAppInner withManagedEnvironmentId(String 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 workloadProfileType property: Workload profile type to pin for container app execution. + * + * @return the workloadProfileType value. + */ + public String workloadProfileType() { + return this.innerProperties() == null ? null : this.innerProperties().workloadProfileType(); + } + + /** + * Set the workloadProfileType property: Workload profile type to pin for container app execution. + * + * @param workloadProfileType the workloadProfileType value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withWorkloadProfileType(String workloadProfileType) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withWorkloadProfileType(workloadProfileType); + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -189,12 +262,24 @@ 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(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java index e3a5b1736b4f6..0f2727af7ead4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java @@ -21,11 +21,23 @@ public final class ContainerAppProperties { private ContainerAppProvisioningState provisioningState; /* - * Resource ID of the Container App's environment. + * Deprecated. Resource ID of the Container App's environment. */ @JsonProperty(value = "managedEnvironmentId") private String managedEnvironmentId; + /* + * Resource ID of environment. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Workload profile type to pin for container app execution. + */ + @JsonProperty(value = "workloadProfileType") + private String workloadProfileType; + /* * Name of the latest revision of the Container App. */ @@ -62,6 +74,12 @@ public final class ContainerAppProperties { @JsonProperty(value = "outboundIPAddresses", access = JsonProperty.Access.WRITE_ONLY) private List outboundIpAddresses; + /* + * The endpoint of the eventstream of the container app. + */ + @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String eventStreamEndpoint; + /** * Get the provisioningState property: Provisioning state of the Container App. * @@ -72,7 +90,7 @@ public ContainerAppProvisioningState provisioningState() { } /** - * Get the managedEnvironmentId property: Resource ID of the Container App's environment. + * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. * * @return the managedEnvironmentId value. */ @@ -81,7 +99,7 @@ public String managedEnvironmentId() { } /** - * Set the managedEnvironmentId property: Resource ID of the Container App's environment. + * 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. @@ -91,6 +109,46 @@ public ContainerAppProperties withManagedEnvironmentId(String managedEnvironment 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 workloadProfileType property: Workload profile type to pin for container app execution. + * + * @return the workloadProfileType value. + */ + public String workloadProfileType() { + return this.workloadProfileType; + } + + /** + * Set the workloadProfileType property: Workload profile type to pin for container app execution. + * + * @param workloadProfileType the workloadProfileType value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties withWorkloadProfileType(String workloadProfileType) { + this.workloadProfileType = workloadProfileType; + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -167,6 +225,15 @@ 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. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java index 612f3c3383d77..a0b246103f13b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java @@ -5,46 +5,80 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; +import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Custom domain analysis. */ @Fluent -public final class CustomHostnameAnalysisResultInner extends ProxyResource { +public final class CustomHostnameAnalysisResultInner { /* - * CustomHostnameAnalysisResult resource specific properties + * Host name that was analyzed */ - @JsonProperty(value = "properties") - private CustomHostnameAnalysisResultProperties innerProperties; + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * true if hostname is already verified; otherwise, false. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHostnameAlreadyVerified; - /** - * Get the innerProperties property: CustomHostnameAnalysisResult resource specific properties. - * - * @return the innerProperties value. + /* + * DNS verification test result. */ - private CustomHostnameAnalysisResultProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) + private DnsVerificationTestResult customDomainVerificationTest; - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + /* + * Raw failure information if DNS verification fails. */ - public SystemData systemData() { - return this.systemData; - } + @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) + private CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo; + + /* + * true if there is a conflict on the Container App's managed environment; otherwise, + * false. + */ + @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictOnManagedEnvironment; + + /* + * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. + */ + @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String conflictingContainerAppResourceId; + + /* + * CName records visible for this hostname. + */ + @JsonProperty(value = "cNameRecords") + private List cNameRecords; + + /* + * TXT records visible for this hostname. + */ + @JsonProperty(value = "txtRecords") + private List txtRecords; + + /* + * A records visible for this hostname. + */ + @JsonProperty(value = "aRecords") + private List aRecords; + + /* + * Alternate CName records visible for this hostname. + */ + @JsonProperty(value = "alternateCNameRecords") + private List alternateCNameRecords; + + /* + * Alternate TXT records visible for this hostname. + */ + @JsonProperty(value = "alternateTxtRecords") + private List alternateTxtRecords; /** * Get the hostname property: Host name that was analyzed. @@ -52,7 +86,7 @@ public SystemData systemData() { * @return the hostname value. */ public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + return this.hostname; } /** @@ -62,7 +96,7 @@ public String hostname() { * @return the isHostnameAlreadyVerified value. */ public Boolean isHostnameAlreadyVerified() { - return this.innerProperties() == null ? null : this.innerProperties().isHostnameAlreadyVerified(); + return this.isHostnameAlreadyVerified; } /** @@ -71,7 +105,7 @@ public Boolean isHostnameAlreadyVerified() { * @return the customDomainVerificationTest value. */ public DnsVerificationTestResult customDomainVerificationTest() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationTest(); + return this.customDomainVerificationTest; } /** @@ -79,8 +113,8 @@ public DnsVerificationTestResult customDomainVerificationTest() { * * @return the customDomainVerificationFailureInfo value. */ - public DefaultErrorResponseError customDomainVerificationFailureInfo() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationFailureInfo(); + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; } /** @@ -90,7 +124,7 @@ public DefaultErrorResponseError customDomainVerificationFailureInfo() { * @return the hasConflictOnManagedEnvironment value. */ public Boolean hasConflictOnManagedEnvironment() { - return this.innerProperties() == null ? null : this.innerProperties().hasConflictOnManagedEnvironment(); + return this.hasConflictOnManagedEnvironment; } /** @@ -100,7 +134,7 @@ public Boolean hasConflictOnManagedEnvironment() { * @return the conflictingContainerAppResourceId value. */ public String conflictingContainerAppResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().conflictingContainerAppResourceId(); + return this.conflictingContainerAppResourceId; } /** @@ -109,7 +143,7 @@ public String conflictingContainerAppResourceId() { * @return the cNameRecords value. */ public List cNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().cNameRecords(); + return this.cNameRecords; } /** @@ -119,10 +153,7 @@ public List cNameRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withCNameRecords(cNameRecords); + this.cNameRecords = cNameRecords; return this; } @@ -132,7 +163,7 @@ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameReco * @return the txtRecords value. */ public List txtRecords() { - return this.innerProperties() == null ? null : this.innerProperties().txtRecords(); + return this.txtRecords; } /** @@ -142,10 +173,7 @@ public List txtRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withTxtRecords(txtRecords); + this.txtRecords = txtRecords; return this; } @@ -155,7 +183,7 @@ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) * @return the aRecords value. */ public List aRecords() { - return this.innerProperties() == null ? null : this.innerProperties().aRecords(); + return this.aRecords; } /** @@ -165,10 +193,7 @@ public List aRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withARecords(aRecords); + this.aRecords = aRecords; return this; } @@ -178,7 +203,7 @@ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { * @return the alternateCNameRecords value. */ public List alternateCNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().alternateCNameRecords(); + return this.alternateCNameRecords; } /** @@ -188,10 +213,7 @@ public List alternateCNameRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withAlternateCNameRecords(alternateCNameRecords); + this.alternateCNameRecords = alternateCNameRecords; return this; } @@ -201,7 +223,7 @@ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List * @return the alternateTxtRecords value. */ public List alternateTxtRecords() { - return this.innerProperties() == null ? null : this.innerProperties().alternateTxtRecords(); + return this.alternateTxtRecords; } /** @@ -211,10 +233,7 @@ public List alternateTxtRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withAlternateTxtRecords(alternateTxtRecords); + this.alternateTxtRecords = alternateTxtRecords; return this; } @@ -224,8 +243,8 @@ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List al * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (customDomainVerificationFailureInfo() != null) { + customDomainVerificationFailureInfo().validate(); } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java deleted file mode 100644 index c567bf14bcfdf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** CustomHostnameAnalysisResult resource specific properties. */ -@Fluent -public final class CustomHostnameAnalysisResultProperties { - /* - * Host name that was analyzed - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * true if hostname is already verified; otherwise, - * false. - */ - @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isHostnameAlreadyVerified; - - /* - * DNS verification test result. - */ - @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) - private DnsVerificationTestResult customDomainVerificationTest; - - /* - * Raw failure information if DNS verification fails. - */ - @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) - private DefaultErrorResponseError customDomainVerificationFailureInfo; - - /* - * true if there is a conflict on the Container App's managed - * environment; otherwise, false. - */ - @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasConflictOnManagedEnvironment; - - /* - * Name of the conflicting Container App on the Managed Environment if it's - * within the same subscription. - */ - @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String conflictingContainerAppResourceId; - - /* - * CName records visible for this hostname. - */ - @JsonProperty(value = "cNameRecords") - private List cNameRecords; - - /* - * TXT records visible for this hostname. - */ - @JsonProperty(value = "txtRecords") - private List txtRecords; - - /* - * A records visible for this hostname. - */ - @JsonProperty(value = "aRecords") - private List aRecords; - - /* - * Alternate CName records visible for this hostname. - */ - @JsonProperty(value = "alternateCNameRecords") - private List alternateCNameRecords; - - /* - * Alternate TXT records visible for this hostname. - */ - @JsonProperty(value = "alternateTxtRecords") - private List alternateTxtRecords; - - /** - * 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 DefaultErrorResponseError 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 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 CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties 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 CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties 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 CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties 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 CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties 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 CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties 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(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java index 7d742a9d49b30..1ad2032833cd8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java @@ -22,8 +22,7 @@ public final class DaprComponentInner extends ProxyResource { private DaprComponentProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -161,6 +160,29 @@ public DaprComponentInner withSecrets(List 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. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java index 9341c9fa3aed2..a8d5a81ea6aea 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java @@ -43,6 +43,12 @@ public final class DaprComponentProperties { @JsonProperty(value = "secrets") private List secrets; + /* + * Name of a Dapr component to retrieve component secrets from + */ + @JsonProperty(value = "secretStoreComponent") + private String secretStoreComponent; + /* * Component metadata */ @@ -155,6 +161,26 @@ public DaprComponentProperties withSecrets(List 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. * 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 new file mode 100644 index 0000000000000..d799fc3c0a3f0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Diagnostics data collection for a resource. */ +@Fluent +public final class DiagnosticsCollectionInner { + /* + * Collection of diagnostic data. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model DiagnosticsCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsCollectionInner.class); +} 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 new file mode 100644 index 0000000000000..fb76d8b7f1357 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics data for a resource. */ +@Fluent +public final class DiagnosticsInner extends ProxyResource { + /* + * Diagnostics resource specific properties + */ + @JsonProperty(value = "properties") + private DiagnosticsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java new file mode 100644 index 0000000000000..04e59646b4bb6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Environment Auth Token. */ +@Fluent +public final class EnvironmentAuthTokenInner extends Resource { + /* + * Environment auth token resource specific properties + */ + @JsonProperty(value = "properties") + private EnvironmentAuthTokenProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** {@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(); + } + } +} 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 new file mode 100644 index 0000000000000..0c34767011077 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Environment auth token resource specific properties. */ +@Immutable +public final class EnvironmentAuthTokenProperties { + /* + * Auth token value. + */ + @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) + private String token; + + /* + * Token expiration date. + */ + @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expires; + + /** + * 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() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java index 6eb3f4a165a4a..f86ffa2c5b5f5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java @@ -8,14 +8,24 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; /** An environment for hosting container apps. */ @Fluent public final class ManagedEnvironmentInner extends Resource { + /* + * SKU properties of the Environment. + */ + @JsonProperty(value = "sku") + private EnvironmentSkuProperties sku; + /* * Managed environment resource specific properties */ @@ -23,12 +33,31 @@ public final class ManagedEnvironmentInner extends Resource { private ManagedEnvironmentProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** + * Get the sku property: SKU properties of the Environment. + * + * @return the sku value. + */ + public EnvironmentSkuProperties sku() { + return this.sku; + } + + /** + * Set the sku property: SKU properties of the Environment. + * + * @param sku the sku value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withSku(EnvironmentSkuProperties sku) { + this.sku = sku; + return this; + } + /** * Get the innerProperties property: Managed environment resource specific properties. * @@ -218,12 +247,70 @@ public ManagedEnvironmentInner withZoneRedundant(Boolean 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; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (sku() != null) { + sku().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java index 3a58e75fc37d0..11aa4c813e8a2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Managed environment resource specific properties. */ @Fluent @@ -20,15 +23,13 @@ public final class ManagedEnvironmentProperties { private EnvironmentProvisioningState provisioningState; /* - * Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry + * Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ @JsonProperty(value = "daprAIInstrumentationKey") private String daprAIInstrumentationKey; /* - * Application Insights connection string used by Dapr to export Service to - * Service communication telemetry + * Application Insights connection string used by Dapr to export Service to Service communication telemetry */ @JsonProperty(value = "daprAIConnectionString") private String daprAIConnectionString; @@ -71,6 +72,24 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; + /* + * Custom domain configuration for the environment + */ + @JsonProperty(value = "customDomainConfiguration") + private CustomDomainConfiguration customDomainConfiguration; + + /* + * The endpoint of the eventstream of the Environment. + */ + @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String eventStreamEndpoint; + + /* + * Workload profiles configured for the Managed Environment. + */ + @JsonProperty(value = "workloadProfiles") + private List workloadProfiles; + /** * Get the provisioningState property: Provisioning state of the Environment. * @@ -213,6 +232,56 @@ public ManagedEnvironmentProperties withZoneRedundant(Boolean 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; + } + /** * Validates the instance. * @@ -225,5 +294,11 @@ public void validate() { if (appLogsConfiguration() != null) { appLogsConfiguration().validate(); } + if (customDomainConfiguration() != null) { + customDomainConfiguration().validate(); + } + if (workloadProfiles() != null) { + workloadProfiles().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java index 887f1f9bd6aae..d022b2eaf5d69 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java @@ -20,8 +20,7 @@ public final class ManagedEnvironmentStorageInner extends ProxyResource { private ManagedEnvironmentStorageProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java index 1fdacd15d9fec..ea79ba7d1781f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java @@ -22,8 +22,7 @@ public final class ReplicaInner extends ProxyResource { private ReplicaProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java index 10388304b930d..56228eb8a0bf7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java @@ -23,8 +23,7 @@ public final class RevisionInner extends ProxyResource { private RevisionProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java index 35e2285d769b3..980c0cac9ee04 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java @@ -21,8 +21,7 @@ public final class SourceControlInner extends ProxyResource { private SourceControlProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java index 419aa65a6c9fd..a3bbcdc8d56be 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java @@ -866,7 +866,9 @@ public Response deleteWithResponse( } /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. @@ -933,7 +935,9 @@ private Mono> updateWithResponseAsync( } /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. @@ -999,7 +1003,9 @@ private Mono> updateWithResponseAsync( } /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. @@ -1022,7 +1028,9 @@ private Mono updateAsync( } /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. @@ -1043,7 +1051,9 @@ public CertificateInner update( } /** - * Patches a certificate. Currently only patching of tags is supported. + * 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. @@ -1071,7 +1081,8 @@ public Response updateWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1106,7 +1117,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 new file mode 100644 index 0000000000000..775d10917d31e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java @@ -0,0 +1,210 @@ +// Copyright (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.ConnectedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; +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 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 = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); + this.connectedEnvironmentName = Utils.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 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; + } +} 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 new file mode 100644 index 0000000000000..6b49e3cdead7f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java @@ -0,0 +1,153 @@ +// Copyright (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 = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.storageName = Utils.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 new file mode 100644 index 0000000000000..e3f77be64af18 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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 new file mode 100644 index 0000000000000..809b80c957703 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -0,0 +1,1177 @@ +// Copyright (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") + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 getAsync(resourceGroupName, connectedEnvironmentName, certificateName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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(); + } + + /** + * 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. + * @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 on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) + .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. + * @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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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) { + deleteAsync(resourceGroupName, connectedEnvironmentName, certificateName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 updateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 new file mode 100644 index 0000000000000..520533110bfcb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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.CertificatePatch; +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 Utils.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 Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + } + + 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 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 createOrUpdate( + String resourceGroupName, String connectedEnvironmentName, String certificateName) { + CertificateInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, 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 void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + } + + public Certificate update( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope) { + CertificateInner inner = + this + .serviceClient() + .update(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ConnectedEnvironmentsCertificatesClient 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/ConnectedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java new file mode 100644 index 0000000000000..79c6d64198261 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java @@ -0,0 +1,1701 @@ +// Copyright (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") + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if 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 getByResourceGroupAsync(resourceGroupName, connectedEnvironmentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if 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(); + } + + /** + * 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 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 updateAsync(resourceGroupName, connectedEnvironmentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 checkNameAvailabilityAsync(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 new file mode 100644 index 0000000000000..918d6bb05b381 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -0,0 +1,1122 @@ +// Copyright (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") + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 getAsync(resourceGroupName, connectedEnvironmentName, componentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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) { + deleteAsync(resourceGroupName, connectedEnvironmentName, componentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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(); + } + + /** + * 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 ARM resource 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 ARM resource 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 ARM resource 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprSecretsCollectionInner listSecrets( + String resourceGroupName, String connectedEnvironmentName, String componentName) { + return listSecretsAsync(resourceGroupName, connectedEnvironmentName, componentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 ARM resource 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 new file mode 100644 index 0000000000000..4d6724d330df9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java @@ -0,0 +1,154 @@ +// Copyright (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 Utils.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 Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + } + + 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 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 createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope) { + DaprComponentInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, 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 void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + + 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 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; + } + } + + private ConnectedEnvironmentsDaprComponentsClient 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/ConnectedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java new file mode 100644 index 0000000000000..38f1e41545143 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java @@ -0,0 +1,249 @@ +// Copyright (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 Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + } + + 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 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 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 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 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 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 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 ConnectedEnvironment getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.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 new file mode 100644 index 0000000000000..0b5835e38676f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -0,0 +1,796 @@ +// Copyright (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") + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 listAsync(resourceGroupName, connectedEnvironmentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 getAsync(resourceGroupName, connectedEnvironmentName, storageName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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) { + deleteAsync(resourceGroupName, connectedEnvironmentName, storageName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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(); + } +} 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 new file mode 100644 index 0000000000000..765f6a7240f68 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java @@ -0,0 +1,221 @@ +// Copyright (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 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 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 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 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 void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName); + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + } + + public ConnectedEnvironmentStorage getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.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 = Utils.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 new file mode 100644 index 0000000000000..186b92d42676a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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 index 3a5ee744f9754..11bf537ca2fe4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java @@ -10,8 +10,10 @@ 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.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.SecretsCollection; import com.azure.resourcemanager.appcontainers.models.Template; @@ -49,6 +51,10 @@ public Map tags() { } } + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + public ManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -61,6 +67,14 @@ public String managedEnvironmentId() { return this.innerModel().managedEnvironmentId(); } + public String environmentId() { + return this.innerModel().environmentId(); + } + + public String workloadProfileType() { + return this.innerModel().workloadProfileType(); + } + public String latestRevisionName() { return this.innerModel().latestRevisionName(); } @@ -90,6 +104,10 @@ public List outboundIpAddresses() { } } + public String eventStreamEndpoint() { + return this.innerModel().eventStreamEndpoint(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -212,6 +230,14 @@ public Response listSecretsWithResponse(Context context) { return serviceManager.containerApps().listSecretsWithResponse(resourceGroupName, containerAppName, context); } + public ContainerAppAuthToken getAuthToken() { + return serviceManager.containerApps().getAuthToken(resourceGroupName, containerAppName); + } + + public Response getAuthTokenWithResponse(Context context) { + return serviceManager.containerApps().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); + } + public ContainerAppImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -227,6 +253,11 @@ public ContainerAppImpl withTags(Map 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; @@ -237,6 +268,16 @@ public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { return this; } + public ContainerAppImpl withEnvironmentId(String environmentId) { + this.innerModel().withEnvironmentId(environmentId); + return this; + } + + public ContainerAppImpl withWorkloadProfileType(String workloadProfileType) { + this.innerModel().withWorkloadProfileType(workloadProfileType); + return this; + } + public ContainerAppImpl withConfiguration(Configuration configuration) { this.innerModel().withConfiguration(configuration); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java index 7c198677b0fce..a05676414f52a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java @@ -119,24 +119,26 @@ public ContainerAppsApiClientBuilder serializerAdapter(SerializerAdapter seriali * @return an instance of ContainerAppsApiClientImpl. */ public ContainerAppsApiClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + 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 index c55e77b650a3a..dd90bb8546754 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java @@ -23,14 +23,21 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; 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.ContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; 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; @@ -178,6 +185,42 @@ public DaprComponentsClient getDaprComponents() { return this.daprComponents; } + /** 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 OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -250,6 +293,54 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { return this.containerAppsSourceControls; } + /** 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; + } + /** * Initializes an instance of ContainerAppsApiClient client. * @@ -272,18 +363,25 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-03-01"; + this.apiVersion = "2022-06-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.containerApps = new ContainerAppsClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); + this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); + this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); + this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); this.operations = new OperationsClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); + this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); } /** 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 index 3a7906db0ca57..3a5155cdb1dc6 100644 --- 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 @@ -827,7 +827,8 @@ public Response deleteWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -864,7 +865,8 @@ private Mono> listByContainerAppNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 index e458a6c8c21f1..493dd9067c8ab 100644 --- 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 @@ -34,6 +34,7 @@ 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; @@ -185,6 +186,21 @@ Mono> listSecrets( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + + "/{containerAppName}/authtoken") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.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"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1163,7 +1179,9 @@ public void delete(String resourceGroupName, String containerAppName, Context co } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1220,7 +1238,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1275,7 +1295,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1297,7 +1319,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1320,7 +1344,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1337,7 +1363,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1355,7 +1383,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1374,7 +1404,9 @@ private Mono updateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1394,7 +1426,9 @@ private Mono updateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1409,7 +1443,9 @@ public void update(String resourceGroupName, String containerAppName, ContainerA } /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -1743,10 +1779,155 @@ public Response listSecretsWithResponse( return listSecretsWithResponseAsync(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 ManagementException thrown if the request is rejected by server. + * @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 ManagementException thrown if the request is rejected by server. + * @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 ManagementException thrown if the request is rejected by server. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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 getAuthTokenAsync(resourceGroupName, containerAppName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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 the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1783,7 +1964,8 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1821,7 +2003,8 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1858,7 +2041,8 @@ private Mono> listByResourceGroupNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 new file mode 100644 index 0000000000000..e18d57dd407c1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java @@ -0,0 +1,1169 @@ +// Copyright (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") + private 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(ManagementException.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 getDetectorAsync(resourceGroupName, containerAppName, detectorName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 getRevisionAsync(resourceGroupName, containerAppName, revisionName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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 ManagementException thrown if 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 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 ManagementException thrown if 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 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 ManagementException thrown if 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner getRoot(String resourceGroupName, String containerAppName) { + return getRootAsync(resourceGroupName, containerAppName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 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 next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 new file mode 100644 index 0000000000000..1c96b18f95972 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java @@ -0,0 +1,138 @@ +// Copyright (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 Utils.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 Utils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); + } + + 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 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 PagedIterable listRevisions(String resourceGroupName, String containerAppName) { + PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); + return Utils.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 Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + } + + 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 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 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; + } + } + + 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; + } + } + + 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 index d996b14b32e77..2cb229b8a48a8 100644 --- 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 @@ -10,10 +10,12 @@ 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; @@ -144,6 +146,30 @@ public Response listSecretsWithResponse( } } + 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 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 ContainerApp getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 index a480adfb7c7e7..4fb115bf791c5 100644 --- 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 @@ -989,7 +989,8 @@ public Response restartRevisionWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1025,7 +1026,8 @@ private Mono> listRevisionsNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java index 1b7ddaef4a88d..0d79af65b0f45 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java @@ -101,7 +101,7 @@ Mono> get( @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + "/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200, 202}) + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> createOrUpdate( @HostParam("$host") String endpoint, @@ -1082,7 +1082,8 @@ public void delete(String resourceGroupName, String containerAppName, String sou /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1119,7 +1120,8 @@ private Mono> listByContainerAppNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 index fb9b87b4236cf..f7ff9f2caa453 100644 --- 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 @@ -4,10 +4,9 @@ package com.azure.resourcemanager.appcontainers.implementation; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; +import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; import java.util.Collections; import java.util.List; @@ -24,22 +23,6 @@ public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAna 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 hostname() { return this.innerModel().hostname(); } @@ -52,7 +35,7 @@ public DnsVerificationTestResult customDomainVerificationTest() { return this.innerModel().customDomainVerificationTest(); } - public DefaultErrorResponseError customDomainVerificationFailureInfo() { + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { return this.innerModel().customDomainVerificationFailureInfo(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java index 6c90afbc1afc5..95fa7d96c7141 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java @@ -61,6 +61,10 @@ public List secrets() { } } + public String secretStoreComponent() { + return this.innerModel().secretStoreComponent(); + } + public List metadata() { List inner = this.innerModel().metadata(); if (inner != null) { @@ -222,6 +226,11 @@ public DaprComponentImpl withSecrets(List 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; 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 index b1b7edd5495d2..6e141da0ded00 100644 --- 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 @@ -492,7 +492,9 @@ public Response getWithResponse( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -557,7 +559,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -621,7 +625,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -643,7 +649,9 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -664,7 +672,9 @@ public DaprComponentInner createOrUpdate( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * 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. @@ -689,7 +699,9 @@ public Response createOrUpdateWithResponse( } /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -743,7 +755,9 @@ private Mono> deleteWithResponseAsync( } /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -795,7 +809,9 @@ private Mono> deleteWithResponseAsync( } /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -812,7 +828,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, } /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -827,7 +845,9 @@ public void delete(String resourceGroupName, String environmentName, String comp } /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -1008,7 +1028,8 @@ public Response listSecretsWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1043,7 +1064,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 new file mode 100644 index 0000000000000..89edd269aaada --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.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 new file mode 100644 index 0000000000000..593d62d7018a3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.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/EnvironmentAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java new file mode 100644 index 0000000000000..c2a56e6d8305b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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/ManagedEnvironmentDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java new file mode 100644 index 0000000000000..db96867867595 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java @@ -0,0 +1,419 @@ +// Copyright (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") + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 listDetectorsAsync(resourceGroupName, environmentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 getDetectorAsync(resourceGroupName, environmentName, detectorName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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(); + } +} 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 new file mode 100644 index 0000000000000..6163126dbb742 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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 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 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 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; + } + } + + 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; + } + } + + 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 index 75dba1b16bcb4..0e0a17d741225 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java @@ -4,15 +4,21 @@ 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.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; 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; public final class ManagedEnvironmentImpl @@ -46,6 +52,10 @@ public Map tags() { } } + public EnvironmentSkuProperties sku() { + return this.innerModel().sku(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -86,6 +96,23 @@ 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 Region region() { return Region.fromName(this.regionName()); } @@ -191,6 +218,16 @@ public ManagedEnvironment refresh(Context context) { return this; } + public EnvironmentAuthToken getAuthToken() { + return serviceManager.managedEnvironments().getAuthToken(resourceGroupName, environmentName); + } + + public Response getAuthTokenWithResponse(Context context) { + return serviceManager + .managedEnvironments() + .getAuthTokenWithResponse(resourceGroupName, environmentName, context); + } + public ManagedEnvironmentImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -206,6 +243,11 @@ public ManagedEnvironmentImpl withTags(Map tags) { return this; } + public ManagedEnvironmentImpl withSku(EnvironmentSkuProperties sku) { + this.innerModel().withSku(sku); + return this; + } + public ManagedEnvironmentImpl withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { this.innerModel().withDaprAIInstrumentationKey(daprAIInstrumentationKey); return this; @@ -230,4 +272,14 @@ 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; + } } 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 index f49b7b00fa519..f44b7b01132d8 100644 --- 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 @@ -14,6 +14,7 @@ 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; @@ -26,12 +27,14 @@ 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.ManagedEnvironmentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsCollection; @@ -152,6 +155,21 @@ Mono>> update( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/authtoken") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.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("{nextLink}") @ExpectedResponses({200}) @@ -174,7 +192,9 @@ Mono> listByResourceGroupNext( } /** - * Get all Managed Environments for a subscription. + * 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. @@ -219,7 +239,9 @@ private Mono> listSinglePageAsync() { } /** - * Get all Managed Environments for a subscription. + * 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. @@ -263,7 +285,9 @@ private Mono> listSinglePageAsync(Context } /** - * Get all Managed Environments for a subscription. + * 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. @@ -276,7 +300,9 @@ private PagedFlux listAsync() { } /** - * Get all Managed Environments for a subscription. + * 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. @@ -291,7 +317,9 @@ private PagedFlux listAsync(Context context) { } /** - * Get all Managed Environments for a subscription. + * 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. @@ -303,7 +331,9 @@ public PagedIterable list() { } /** - * Get all Managed Environments for a subscription. + * 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. @@ -317,7 +347,9 @@ public PagedIterable list(Context context) { } /** - * Get all the Managed Environments in a resource group. + * 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. @@ -369,7 +401,9 @@ private Mono> listByResourceGroupSinglePa } /** - * Get all the Managed Environments in a resource group. + * 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. @@ -420,7 +454,9 @@ private Mono> listByResourceGroupSinglePa } /** - * Get all the Managed Environments in a resource group. + * 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. @@ -436,7 +472,9 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Get all the Managed Environments in a resource group. + * 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. @@ -453,7 +491,9 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Get all the Managed Environments in a resource group. + * 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. @@ -467,7 +507,9 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Get all the Managed Environments in a resource group. + * 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. @@ -482,7 +524,9 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -532,7 +576,9 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -580,7 +626,9 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -597,7 +645,9 @@ private Mono getByResourceGroupAsync(String resourceGro } /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -612,7 +662,9 @@ public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, Stri } /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -629,7 +681,9 @@ public Response getByResourceGroupWithResponse( } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -687,7 +741,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -746,7 +802,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -772,7 +830,9 @@ private PollerFlux, ManagedEnvironmentInner> } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -803,7 +863,9 @@ private PollerFlux, ManagedEnvironmentInner> } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -820,7 +882,9 @@ public SyncPoller, ManagedEnvironmentInner> } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -842,7 +906,9 @@ public SyncPoller, ManagedEnvironmentInner> } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -861,7 +927,9 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -884,7 +952,9 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -901,7 +971,9 @@ public ManagedEnvironmentInner createOrUpdate( } /** - * Creates or updates a Managed Environment used to host container apps. + * 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. @@ -922,7 +994,9 @@ public ManagedEnvironmentInner createOrUpdate( } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -970,7 +1044,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1017,7 +1093,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1036,7 +1114,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1057,7 +1137,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1072,7 +1154,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1089,7 +1173,9 @@ public SyncPoller, Void> beginDelete( } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1106,7 +1192,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName) } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1124,7 +1212,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1138,7 +1228,9 @@ public void delete(String resourceGroupName, String environmentName) { } /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -1153,7 +1245,9 @@ public void delete(String resourceGroupName, String environmentName, Context con } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1210,7 +1304,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1268,7 +1364,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1290,7 +1388,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1316,7 +1416,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1333,7 +1435,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1354,7 +1458,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1373,7 +1479,9 @@ private Mono updateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1396,7 +1504,9 @@ private Mono updateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1411,7 +1521,9 @@ public void update(String resourceGroupName, String environmentName, ManagedEnvi } /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -1430,10 +1542,165 @@ public void update( 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 ManagementException 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 ManagementException 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 ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 getAuthTokenAsync(resourceGroupName, environmentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1469,7 +1736,8 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1506,7 +1774,8 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1542,7 +1811,8 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 new file mode 100644 index 0000000000000..0b0945586a589 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.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") + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if 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 getRootAsync(resourceGroupName, environmentName).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if 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(); + } +} 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 new file mode 100644 index 0000000000000..4decfe562f9db --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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 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; + } + } + + 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; + } + } + + 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 index 143dc935e8720..865d2946bbdc7 100644 --- 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 @@ -10,7 +10,9 @@ 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.models.EnvironmentAuthToken; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; @@ -93,6 +95,30 @@ public void update( this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope, context); } + 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 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 ManagedEnvironment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 index 8dc0a74267be5..67573d1fd9aeb 100644 --- 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 @@ -71,7 +71,9 @@ Mono> checkNameAvailability( } /** - * Checks if resource name is available. + * 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. @@ -130,7 +132,9 @@ private Mono> checkNameAvailability } /** - * Checks if resource name is available. + * 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. @@ -190,7 +194,9 @@ private Mono> checkNameAvailability } /** - * Checks if resource name is available. + * 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. @@ -208,7 +214,9 @@ private Mono checkNameAvailabilityAsync( } /** - * Checks if resource name is available. + * 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. @@ -225,7 +233,9 @@ public CheckNameAvailabilityResponseInner checkNameAvailability( } /** - * Checks if resource name is available. + * 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. 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 index 0cab6ac197d25..951798c3d460d 100644 --- 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 @@ -198,7 +198,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -234,7 +235,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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 index 88fd0d585724c..8f2d01d44becd 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AccessMode. */ +/** Access mode for storage. */ public final class AccessMode extends ExpandableStringEnum { /** Static value ReadOnly for AccessMode. */ public static final AccessMode READ_ONLY = fromString("ReadOnly"); 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 new file mode 100644 index 0000000000000..08b42558079c6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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 or finds a Action from its string representation. + * + * @param name a name to look for. + * @return the corresponding Action. + */ + @JsonCreator + 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 index 490d92a661480..1ade7f9c0e39e 100644 --- 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 @@ -8,7 +8,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ActiveRevisionsMode. */ +/** + * 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"); 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 index 887906a892ba9..bcb6d46d4eeca 100644 --- 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 @@ -12,8 +12,7 @@ @Fluent public final class AllowedAudiencesValidation { /* - * The configuration settings of the allowed list of audiences from which - * to validate the JWT token. + * The configuration settings of the allowed list of audiences from which to validate the JWT token. */ @JsonProperty(value = "allowedAudiences") private List allowedAudiences; 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 index 33433e341adbd..32c619fd30599 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AppProtocol. */ +/** 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"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java index 5a7a4eb8b2917..7a4b7948ef9df 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java @@ -11,8 +11,8 @@ @Fluent public final class Apple { /* - * false if the Apple provider should not be enabled despite - * the set registration; otherwise, true. + * false if the Apple provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java index 0450f8bd42991..85400026423f3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java @@ -11,17 +11,16 @@ @Fluent public final class AuthPlatform { /* - * true if the Authentication / Authorization feature is - * enabled for the current app; otherwise, false. + * true if the Authentication / Authorization feature is enabled for the current app; otherwise, + * false. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The RuntimeVersion of the Authentication / Authorization feature in use - * for the current app. - * The setting in this value can control the behavior of certain features - * in the Authentication / Authorization module. + * The 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. */ @JsonProperty(value = "runtimeVersion") private String runtimeVersion; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java index daef4f26cf8b2..f46e632bdb1a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java @@ -11,15 +11,14 @@ @Fluent public final class AzureActiveDirectory { /* - * false if the Azure Active Directory provider should not be - * enabled despite the set registration; otherwise, true. + * false if the Azure Active Directory provider should not be enabled despite the set registration; + * otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the Azure Active Directory app - * registration. + * The configuration settings of the Azure Active Directory app registration. */ @JsonProperty(value = "registration") private AzureActiveDirectoryRegistration registration; @@ -31,17 +30,14 @@ public final class AzureActiveDirectory { private AzureActiveDirectoryLogin login; /* - * The configuration settings of the Azure Active Directory token - * validation flow. + * The configuration settings of the Azure Active Directory token validation flow. */ @JsonProperty(value = "validation") 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 + * 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. */ @JsonProperty(value = "isAutoProvisioned") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java index c7622a3e8248a..572ab78792eea 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java @@ -12,16 +12,15 @@ @Fluent public final class AzureActiveDirectoryLogin { /* - * Login parameters to send to the OpenID Connect authorization endpoint - * when + * Login parameters to send to the OpenID Connect authorization endpoint when * a user logs in. Each parameter must be in the form "key=value". */ @JsonProperty(value = "loginParameters") private List loginParameters; /* - * true if the www-authenticate provider should be omitted - * from the request; otherwise, false. + * true if the www-authenticate provider should be omitted from the request; otherwise, + * false. */ @JsonProperty(value = "disableWWWAuthenticate") private Boolean disableWwwAuthenticate; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java index e02a78b65fab1..0a54c9b945a1f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java @@ -11,59 +11,50 @@ @Fluent public final class AzureActiveDirectoryRegistration { /* - * The OpenID Connect Issuer URI that represents the entity which issues - * access tokens for this application. - * When using Azure Active Directory, this value is the URI of the - * directory tenant, e.g. + * 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 + * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html */ @JsonProperty(value = "openIdIssuer") 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 + * 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 + * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html */ @JsonProperty(value = "clientId") private String clientId; /* - * The app setting name that contains the client secret of the relying - * party application. + * The app setting name that contains the client secret of the relying party application. */ @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; /* - * An alternative to the client secret, that is the thumbprint of a - * certificate used for signing purposes. This property acts as + * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This + * property acts as * a replacement for the Client Secret. It is also optional. */ @JsonProperty(value = "clientSecretCertificateThumbprint") private String clientSecretCertificateThumbprint; /* - * An alternative to the client secret thumbprint, that is the subject - * alternative name of a certificate used for signing purposes. This - * property acts as - * a replacement for the Client Secret Certificate Thumbprint. It is also - * optional. + * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for + * signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. */ @JsonProperty(value = "clientSecretCertificateSubjectAlternativeName") private String clientSecretCertificateSubjectAlternativeName; /* - * An alternative to the client secret thumbprint, that is the issuer of a - * certificate used for signing purposes. This property acts as - * a replacement for the Client Secret Certificate Thumbprint. It is also - * optional. + * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. + * This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. */ @JsonProperty(value = "clientSecretCertificateIssuer") private String clientSecretCertificateIssuer; 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 index 40b4c31185614..553e0cb843d45 100644 --- 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 @@ -12,15 +12,13 @@ @Fluent public final class AzureActiveDirectoryValidation { /* - * The configuration settings of the checks that should be made while - * validating the JWT Claims. + * The configuration settings of the checks that should be made while validating the JWT Claims. */ @JsonProperty(value = "jwtClaimChecks") private JwtClaimChecks jwtClaimChecks; /* - * The list of audiences that can make successful - * authentication/authorization requests. + * The list of audiences that can make successful authentication/authorization requests. */ @JsonProperty(value = "allowedAudiences") private List allowedAudiences; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java index 0662fc06212a5..81f758544374b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java @@ -11,8 +11,8 @@ @Fluent public final class AzureStaticWebApps { /* - * false if the Azure Static Web Apps provider should not be - * enabled despite the set registration; otherwise, true. + * false if the Azure Static Web Apps provider should not be enabled despite the set registration; + * otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java new file mode 100644 index 0000000000000..a5e1b3111ed91 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App base container definition. */ +@Fluent +public class BaseContainer { + /* + * Container image tag. + */ + @JsonProperty(value = "image") + private String image; + + /* + * Custom container name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Container start command. + */ + @JsonProperty(value = "command") + private List command; + + /* + * Container start command arguments. + */ + @JsonProperty(value = "args") + private List args; + + /* + * Container environment variables. + */ + @JsonProperty(value = "env") + private List env; + + /* + * Container resource requirements. + */ + @JsonProperty(value = "resources") + private ContainerResources resources; + + /* + * Container volume mounts. + */ + @JsonProperty(value = "volumeMounts") + private List volumeMounts; + + /** + * 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 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()); + } + } +} 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 index 69780955f1499..675cbf07a216a 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BindingType. */ +/** Custom Domain binding type. */ public final class BindingType extends ExpandableStringEnum { /** Static value Disabled for BindingType. */ public static final BindingType DISABLED = fromString("Disabled"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java index 40de74d38aa47..d6ebd44cf847b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java @@ -8,6 +8,7 @@ import com.azure.core.util.CoreUtils; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; +import java.util.List; /** Certificate resource specific properties. */ @Fluent @@ -30,6 +31,12 @@ public final class CertificateProperties { @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) private String subjectName; + /* + * Subject alternative names the certificate applies to. + */ + @JsonProperty(value = "subjectAlternativeNames", access = JsonProperty.Access.WRITE_ONLY) + private List subjectAlternativeNames; + /* * PFX or PEM blob */ @@ -110,6 +117,15 @@ 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. * 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 index 010c6954f6a75..af98d56fd8b83 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CertificateProvisioningState. */ +/** Provisioning state of the certificate. */ public final class CertificateProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for CertificateProvisioningState. */ public static final CertificateProvisioningState SUCCEEDED = fromString("Succeeded"); 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 index 33c8af8b3707f..3a44345d05f54 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CheckNameAvailabilityReason. */ +/** 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"); 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 index 449e7d2d56532..9486ee8854e01 100644 --- 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 @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ClientCredentialMethod. */ +/** The method that should be used to authenticate the user. */ public enum ClientCredentialMethod { /** Enum value ClientSecretPost. */ CLIENT_SECRET_POST("ClientSecretPost"); @@ -27,6 +27,9 @@ public enum ClientCredentialMethod { */ @JsonCreator public static ClientCredentialMethod fromString(String value) { + if (value == null) { + return null; + } ClientCredentialMethod[] items = ClientCredentialMethod.values(); for (ClientCredentialMethod item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -36,6 +39,7 @@ public static ClientCredentialMethod fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java index e47ac5bce80d6..3f7be323da620 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java @@ -18,12 +18,9 @@ public final class Configuration { 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. + * 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. */ @JsonProperty(value = "activeRevisionsMode") private ActiveRevisionsMode activeRevisionsMode; @@ -35,8 +32,7 @@ public final class Configuration { private Ingress ingress; /* - * Collection of private container registry credentials for containers used - * by the Container app + * Collection of private container registry credentials for containers used by the Container app */ @JsonProperty(value = "registries") private List registries; @@ -47,6 +43,12 @@ public final class Configuration { @JsonProperty(value = "dapr") private Dapr dapr; + /* + * Optional. Max inactive revisions a Container App can have. + */ + @JsonProperty(value = "maxInactiveRevisions") + private Integer maxInactiveRevisions; + /** * Get the secrets property: Collection of secrets used by a Container app. * @@ -155,6 +157,26 @@ public Configuration withDapr(Dapr dapr) { 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; + } + /** * Validates the instance. * 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 new file mode 100644 index 0000000000000..78303ad48dd49 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights 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.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 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 { + /** + * 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); + } + } + /** + * 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 { + /** + * 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); + } + } + /** + * 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); +} 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 new file mode 100644 index 0000000000000..6fa1d7cb8e411 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of connectedEnvironments. */ +@Fluent +public final class ConnectedEnvironmentCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * 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()); + } + } +} 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 new file mode 100644 index 0000000000000..cfb4a1c8867cd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** 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 or finds a ConnectedEnvironmentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectedEnvironmentProvisioningState. + */ + @JsonCreator + 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 new file mode 100644 index 0000000000000..0b383982af493 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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 new file mode 100644 index 0000000000000..5287664e0994d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage properties. */ +@Fluent +public final class ConnectedEnvironmentStorageProperties { + /* + * Azure file properties + */ + @JsonProperty(value = "azureFile") + private AzureFileProperties azureFile; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureFile() != null) { + azureFile().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..1177335e4438b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All 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 new file mode 100644 index 0000000000000..2dc9b8cd48010 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if 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); + + /** + * 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); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 new file mode 100644 index 0000000000000..432a4d5eae114 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; + +/** 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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); + + /** + * 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); + + /** + * 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. + */ + Certificate createOrUpdate(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}. + */ + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + 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); + + /** + * 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); + + /** + * 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. + */ + Certificate update( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope); + + /** + * 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}. + */ + Response updateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context); +} 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 new file mode 100644 index 0000000000000..7b353ecfc5c81 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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); + + /** + * 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); + + /** + * 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. + */ + DaprComponent createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope); + + /** + * 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}. + */ + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + 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); + + /** + * 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); + + /** + * 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 ARM resource. + */ + DaprSecretsCollection listSecrets(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 ARM resource along with {@link Response}. + */ + Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); +} 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 new file mode 100644 index 0000000000000..4198008dd868f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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 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 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 index 8bb7266d9ff0a..0a1177d7fb53a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java @@ -10,212 +10,79 @@ /** Container App container definition. */ @Fluent -public final class Container { - /* - * Container image tag. - */ - @JsonProperty(value = "image") - private String image; - - /* - * Custom container name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Container start command. - */ - @JsonProperty(value = "command") - private List command; - - /* - * Container start command arguments. - */ - @JsonProperty(value = "args") - private List args; - - /* - * Container environment variables. - */ - @JsonProperty(value = "env") - private List env; - - /* - * Container resource requirements. - */ - @JsonProperty(value = "resources") - private ContainerResources resources; - +public final class Container extends BaseContainer { /* * List of probes for the container. */ @JsonProperty(value = "probes") private List probes; - /* - * Container volume mounts. - */ - @JsonProperty(value = "volumeMounts") - private List volumeMounts; - /** - * Get the image property: Container image tag. + * Get the probes property: List of probes for the container. * - * @return the image value. + * @return the probes value. */ - public String image() { - return this.image; + public List probes() { + return this.probes; } /** - * Set the image property: Container image tag. + * Set the probes property: List of probes for the container. * - * @param image the image value to set. + * @param probes the probes value to set. * @return the Container object itself. */ - public Container withImage(String image) { - this.image = image; + public Container withProbes(List probes) { + this.probes = probes; return this; } - /** - * Get the name property: Custom container name. - * - * @return the name value. - */ - public String name() { - return this.name; + /** {@inheritDoc} */ + @Override + public Container withImage(String image) { + super.withImage(image); + return this; } - /** - * Set the name property: Custom container name. - * - * @param name the name value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withName(String name) { - this.name = name; + super.withName(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 Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withCommand(List command) { - this.command = command; + super.withCommand(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 Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withArgs(List args) { - this.args = args; + super.withArgs(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 Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withEnv(List env) { - this.env = env; + super.withEnv(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 Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withResources(ContainerResources resources) { - this.resources = resources; + super.withResources(resources); return this; } - /** - * 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; - } - - /** - * 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 Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withVolumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; + super.withVolumeMounts(volumeMounts); return this; } @@ -224,18 +91,11 @@ public Container withVolumeMounts(List volumeMounts) { * * @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(); - } + super.validate(); if (probes() != null) { probes().forEach(e -> e.validate()); } - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java index 8793ada5e92c1..30fb316047e8f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java @@ -48,6 +48,13 @@ public interface ContainerApp { */ 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. @@ -64,12 +71,26 @@ public interface ContainerApp { ContainerAppProvisioningState provisioningState(); /** - * Gets the managedEnvironmentId property: Resource ID of the Container App's environment. + * 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 workloadProfileType property: Workload profile type to pin for container app execution. + * + * @return the workloadProfileType value. + */ + String workloadProfileType(); + /** * Gets the latestRevisionName property: Name of the latest revision of the Container App. * @@ -112,6 +133,13 @@ public interface ContainerApp { */ 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. * @@ -186,8 +214,11 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithExtendedLocation, DefinitionStages.WithIdentity, DefinitionStages.WithManagedEnvironmentId, + DefinitionStages.WithEnvironmentId, + DefinitionStages.WithWorkloadProfileType, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** @@ -215,6 +246,16 @@ interface WithTags { */ 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 { /** @@ -230,13 +271,33 @@ interface WithIdentity { /** The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ interface WithManagedEnvironmentId { /** - * Specifies the managedEnvironmentId property: Resource ID of the Container App's environment.. + * Specifies the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment.. * - * @param managedEnvironmentId 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 workloadProfileType. */ + interface WithWorkloadProfileType { + /** + * Specifies the workloadProfileType property: Workload profile type to pin for container app execution.. + * + * @param workloadProfileType Workload profile type to pin for container app execution. + * @return the next definition stage. + */ + WithCreate withWorkloadProfileType(String workloadProfileType); + } /** The stage of the ContainerApp definition allowing to specify configuration. */ interface WithConfiguration { /** @@ -268,7 +329,9 @@ interface WithTemplate { /** The template for ContainerApp update. */ interface Update extends UpdateStages.WithTags, + UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, + UpdateStages.WithWorkloadProfileType, UpdateStages.WithConfiguration, UpdateStages.WithTemplate { /** @@ -298,6 +361,16 @@ interface WithTags { */ 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 { /** @@ -310,6 +383,16 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ContainerApp update allowing to specify workloadProfileType. */ + interface WithWorkloadProfileType { + /** + * Specifies the workloadProfileType property: Workload profile type to pin for container app execution.. + * + * @param workloadProfileType Workload profile type to pin for container app execution. + * @return the next definition stage. + */ + Update withWorkloadProfileType(String workloadProfileType); + } /** The stage of the ContainerApp update allowing to specify configuration. */ interface WithConfiguration { /** @@ -391,4 +474,24 @@ Response listCustomHostnameAnalysisWithResponse( * @return container App Secrets Collection ARM resource along with {@link Response}. */ Response listSecretsWithResponse(Context context); + + /** + * Get auth token for a container app. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return auth token for a container app. + */ + ContainerAppAuthToken getAuthToken(); + + /** + * 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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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); } 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 new file mode 100644 index 0000000000000..8b00db3906e5c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.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/ContainerAppProbe.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java index f4d33a73ee6f4..c2608aa5af888 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java @@ -14,9 +14,8 @@ @Fluent public final class ContainerAppProbe { /* - * Minimum consecutive failures for the probe to be considered failed after - * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is - * 10. + * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. + * Minimum value is 1. Maximum value is 10. */ @JsonProperty(value = "failureThreshold") private Integer failureThreshold; @@ -28,53 +27,46 @@ public final class ContainerAppProbe { private ContainerAppProbeHttpGet httpGet; /* - * Number of seconds after the container has started before liveness probes - * are initiated. Minimum value is 1. Maximum value is 60. + * Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. + * Maximum value is 60. */ @JsonProperty(value = "initialDelaySeconds") private Integer initialDelaySeconds; /* - * How often (in seconds) to perform the probe. Default to 10 seconds. - * Minimum value is 1. Maximum value is 240. + * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ @JsonProperty(value = "periodSeconds") private Integer periodSeconds; /* - * Minimum consecutive successes for the probe to be considered successful - * after having failed. Defaults to 1. Must be 1 for liveness and startup. - * Minimum value is 1. Maximum value is 10. + * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must + * be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ @JsonProperty(value = "successThreshold") private Integer successThreshold; /* - * TCPSocket specifies an action involving a TCP port. TCP hooks not yet - * supported. + * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ @JsonProperty(value = "tcpSocket") private ContainerAppProbeTcpSocket tcpSocket; /* - * Optional duration in seconds the pod needs to terminate gracefully upon - * probe failure. The grace period is the duration in seconds after the - * processes running in the pod are sent a termination signal and the time - * when the processes are forcibly halted with a kill signal. Set this - * value longer than the expected cleanup time for your process. If this - * value is nil, the pod's terminationGracePeriodSeconds will be used. - * Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop - * immediately via the kill signal (no opportunity to shut down). This is - * an alpha field and requires enabling ProbeTerminationGracePeriod feature - * gate. Maximum value is 3600 seconds (1 hour) + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the + * duration in seconds after the processes running in the pod are sent a termination signal and the time when the + * processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your + * process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value + * overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop + * immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling + * ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ @JsonProperty(value = "terminationGracePeriodSeconds") private Long terminationGracePeriodSeconds; /* - * Number of seconds after which the probe times out. Defaults to 1 second. - * Minimum value is 1. Maximum value is 240. + * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is + * 240. */ @JsonProperty(value = "timeoutSeconds") private Integer timeoutSeconds; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java index cfb6d80072bc7..3ca38a6e764fa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java @@ -12,8 +12,7 @@ @Fluent public final class ContainerAppProbeHttpGet { /* - * Host name to connect to, defaults to the pod IP. You probably want to - * set "Host" in httpHeaders instead. + * Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ @JsonProperty(value = "host") private String host; @@ -31,8 +30,8 @@ public final class ContainerAppProbeHttpGet { private String path; /* - * Name or number of the port to access on the container. Number must be in - * the range 1 to 65535. Name must be an IANA_SVC_NAME. + * Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an + * IANA_SVC_NAME. */ @JsonProperty(value = "port", required = true) private int port; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java index 75c842fc45688..0757aa9e16c90 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java @@ -17,8 +17,8 @@ public final class ContainerAppProbeTcpSocket { private String host; /* - * Number or name of the port to access on the container. Number must be in - * the range 1 to 65535. Name must be an IANA_SVC_NAME. + * Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an + * IANA_SVC_NAME. */ @JsonProperty(value = "port", required = true) private int port; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java index 06a070fd61679..f1b0dfdbda2e5 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ContainerAppProvisioningState. */ +/** 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"); @@ -22,6 +22,9 @@ public final class ContainerAppProvisioningState extends ExpandableStringEnum getByResourceGroupWithResponse( void delete(String resourceGroupName, String containerAppName, Context context); /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -123,7 +125,9 @@ Response getByResourceGroupWithResponse( void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** - * Patches a Container App using JSON Merge Patch. + * 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. @@ -194,6 +198,32 @@ Response listCustomHostnameAnalysisWithResponse( Response listSecretsWithResponse( 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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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); + + /** + * 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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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 the properties of a Container App. * 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 new file mode 100644 index 0000000000000..5403bef5f8194 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.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 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 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.core.management.exception.ManagementException thrown if 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. + */ + ContainerApp getRoot(String resourceGroupName, String containerAppName); + + /** + * 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.core.management.exception.ManagementException thrown if 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 along with {@link Response}. + */ + Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); +} 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 index 8312b3ee5b652..c522358743288 100644 --- 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 @@ -17,8 +17,7 @@ public final class CookieExpiration { private CookieExpirationConvention convention; /* - * The time after the request is made when the session cookie should - * expire. + * The time after the request is made when the session cookie should expire. */ @JsonProperty(value = "timeToExpiration") private String timeToExpiration; 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 index 40118638404fa..defc5483b6e0d 100644 --- 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 @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for CookieExpirationConvention. */ +/** The convention used when determining the session cookie's expiration. */ public enum CookieExpirationConvention { /** Enum value FixedTime. */ FIXED_TIME("FixedTime"), @@ -30,6 +30,9 @@ public enum CookieExpirationConvention { */ @JsonCreator public static CookieExpirationConvention fromString(String value) { + if (value == null) { + return null; + } CookieExpirationConvention[] items = CookieExpirationConvention.values(); for (CookieExpirationConvention item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -39,6 +42,7 @@ public static CookieExpirationConvention fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java index 8c7e016e05873..26cfedaa2b04f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java @@ -24,8 +24,7 @@ public final class CustomDomain { private BindingType bindingType; /* - * Resource Id of the Certificate to be bound to this hostname. Must exist - * in the Managed Environment. + * Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ @JsonProperty(value = "certificateId", required = true) private String certificateId; 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 new file mode 100644 index 0000000000000..7bc3f5a03bb91 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Configuration properties for apps environment custom domain. */ +@Fluent +public final class CustomDomainConfiguration { + /* + * Id used to verify domain name ownership + */ + @JsonProperty(value = "customDomainVerificationId", access = JsonProperty.Access.WRITE_ONLY) + private String customDomainVerificationId; + + /* + * Dns suffix for the environment domain + */ + @JsonProperty(value = "dnsSuffix") + private String dnsSuffix; + + /* + * PFX or PEM blob + */ + @JsonProperty(value = "certificateValue") + private byte[] certificateValue; + + /* + * Certificate password + */ + @JsonProperty(value = "certificatePassword") + private byte[] certificatePassword; + + /* + * Certificate expiration date. + */ + @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expirationDate; + + /* + * Certificate thumbprint. + */ + @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /* + * Subject name of the certificate. + */ + @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) + private String subjectName; + + /** + * 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 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 byte[] certificatePassword() { + return CoreUtils.clone(this.certificatePassword); + } + + /** + * Set the certificatePassword property: Certificate password. + * + * @param certificatePassword the certificatePassword value to set. + * @return the CustomDomainConfiguration object itself. + */ + public CustomDomainConfiguration withCertificatePassword(byte[] certificatePassword) { + this.certificatePassword = CoreUtils.clone(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() { + } +} 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 index b2d9b4e1aa668..74303340899fa 100644 --- 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 @@ -4,40 +4,11 @@ package com.azure.resourcemanager.appcontainers.models; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import java.util.List; /** An immutable client-side representation of CustomHostnameAnalysisResult. */ public interface CustomHostnameAnalysisResult { - /** - * 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 hostname property: Host name that was analyzed. * @@ -65,7 +36,7 @@ public interface CustomHostnameAnalysisResult { * * @return the customDomainVerificationFailureInfo value. */ - DefaultErrorResponseError customDomainVerificationFailureInfo(); + CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo(); /** * Gets the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the 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 new file mode 100644 index 0000000000000..c7f5329111ba3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Raw failure information if DNS verification fails. */ +@Fluent +public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { + /* + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /* + * Details or the error + */ + @JsonProperty(value = "details") + private List details; + + /** + * 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()); + } + } +} 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 new file mode 100644 index 0000000000000..ee0e6e680a03c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Detailed errors. */ +@Immutable +public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { + /* + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * 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() { + } +} 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 index d8db7dcb6afd7..d42f5d4eaeab3 100644 --- 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 @@ -11,22 +11,19 @@ @Fluent public final class CustomOpenIdConnectProvider { /* - * false if the custom Open ID provider provider should not be - * enabled; otherwise, true. + * false if the custom Open ID provider provider should not be enabled; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the custom Open - * ID Connect provider. + * The configuration settings of the app registration for the custom Open ID Connect provider. */ @JsonProperty(value = "registration") private OpenIdConnectRegistration registration; /* - * The configuration settings of the login flow of the custom Open ID - * Connect provider. + * The configuration settings of the login flow of the custom Open ID Connect provider. */ @JsonProperty(value = "login") private OpenIdConnectLogin login; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java index 2674b4fbc2fe0..ea7806b6f90d2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java @@ -23,8 +23,7 @@ public final class Dapr { private String appId; /* - * Tells Dapr which protocol your application is using. Valid options are - * http and grpc. Default is http + * Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http */ @JsonProperty(value = "appProtocol") private AppProtocol appProtocol; @@ -35,6 +34,31 @@ public final class Dapr { @JsonProperty(value = "appPort") private Integer appPort; + /* + * Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + */ + @JsonProperty(value = "httpReadBufferSize") + 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. + */ + @JsonProperty(value = "httpMaxRequestSize") + private Integer httpMaxRequestSize; + + /* + * Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + */ + @JsonProperty(value = "logLevel") + private LogLevel logLevel; + + /* + * Enables API logging for the Dapr sidecar + */ + @JsonProperty(value = "enableApiLogging") + private Boolean enableApiLogging; + /** * Get the enabled property: Boolean indicating if the Dapr side car is enabled. * @@ -117,6 +141,92 @@ public Dapr withAppPort(Integer 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. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java index b2dd926080058..51557bf8158fa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java @@ -75,6 +75,13 @@ public interface DaprComponent { */ 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. * @@ -133,6 +140,7 @@ interface WithCreate DefinitionStages.WithIgnoreErrors, DefinitionStages.WithInitTimeout, DefinitionStages.WithSecrets, + DefinitionStages.WithSecretStoreComponent, DefinitionStages.WithMetadata, DefinitionStages.WithScopes { /** @@ -200,6 +208,16 @@ interface WithSecrets { */ 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 { /** @@ -235,6 +253,7 @@ interface Update UpdateStages.WithIgnoreErrors, UpdateStages.WithInitTimeout, UpdateStages.WithSecrets, + UpdateStages.WithSecretStoreComponent, UpdateStages.WithMetadata, UpdateStages.WithScopes { /** @@ -304,6 +323,16 @@ interface WithSecrets { */ 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 { /** 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 index 133f3dc3e14fb..4fca264253149 100644 --- 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 @@ -68,7 +68,9 @@ Response getWithResponse( String resourceGroupName, String environmentName, String componentName, Context context); /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -81,7 +83,9 @@ Response getWithResponse( void delete(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component from a Managed Environment. + * 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. @@ -152,7 +156,9 @@ Response listSecretsWithResponse( Response getByIdWithResponse(String id, Context context); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -163,7 +169,9 @@ Response listSecretsWithResponse( void deleteById(String id); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param id the resource ID. * @param context The context to associate with this operation. 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 index c34b305a6301c..da8488ddeb2f1 100644 --- 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 @@ -23,8 +23,7 @@ public final class DaprMetadata { private String value; /* - * Name of the Dapr Component secret from which to pull the metadata - * property value. + * Name of the Dapr Component secret from which to pull the metadata property value. */ @JsonProperty(value = "secretRef") private String secretRef; 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 index 8147b632b3ef9..ac2ae2a0ac9e1 100644 --- 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 @@ -12,15 +12,13 @@ @Fluent public final class DefaultAuthorizationPolicy { /* - * The configuration settings of the Azure Active Directory allowed - * principals. + * The configuration settings of the Azure Active Directory allowed principals. */ @JsonProperty(value = "allowedPrincipals") private AllowedPrincipals allowedPrincipals; /* - * The configuration settings of the Azure Active Directory allowed - * applications. + * The configuration settings of the Azure Active Directory allowed applications. */ @JsonProperty(value = "allowedApplications") private List allowedApplications; 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 index 5856c94ab91ef..9cfd6edb32583 100644 --- 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 @@ -30,6 +30,7 @@ public DefaultErrorResponseErrorException(String message, HttpResponse response, 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/DiagnosticDataProviderMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java new file mode 100644 index 0000000000000..e4ef25b4ddcf4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Details of a diagnostics data provider. */ +@Fluent +public final class DiagnosticDataProviderMetadata { + /* + * Name of data provider + */ + @JsonProperty(value = "providerName") + private String providerName; + + /* + * Collection of properties + */ + @JsonProperty(value = "propertyBag") + private List propertyBag; + + /** + * 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()); + } + } +} 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 new file mode 100644 index 0000000000000..972972731d659 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Property details. */ +@Fluent +public final class DiagnosticDataProviderMetadataPropertyBagItem { + /* + * Property name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Property value + */ + @JsonProperty(value = "value") + private String value; + + /** + * 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() { + } +} 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 new file mode 100644 index 0000000000000..757e942335beb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics data column. */ +@Fluent +public final class DiagnosticDataTableResponseColumn { + /* + * Column name + */ + @JsonProperty(value = "columnName") + private String columnName; + + /* + * Data type of the column + */ + @JsonProperty(value = "dataType") + private String dataType; + + /* + * Column type + */ + @JsonProperty(value = "columnType") + private String columnType; + + /** + * 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() { + } +} 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 new file mode 100644 index 0000000000000..3c03967d69378 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Diagnostics data table. */ +@Fluent +public final class DiagnosticDataTableResponseObject { + /* + * Table name + */ + @JsonProperty(value = "tableName") + private String tableName; + + /* + * Columns in the table + */ + @JsonProperty(value = "columns") + private List columns; + + /* + * Rows in the table + */ + @JsonProperty(value = "rows") + private List rows; + + /** + * 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()); + } + } +} 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 new file mode 100644 index 0000000000000..e0eca4e487763 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rendering details of a diagnostics table. */ +@Fluent +public final class DiagnosticRendering { + /* + * Rendering type + */ + @JsonProperty(value = "type") + private Integer type; + + /* + * Title of the table + */ + @JsonProperty(value = "title") + private String title; + + /* + * Description of the table + */ + @JsonProperty(value = "description") + private String description; + + /* + * Flag if the table should be rendered + */ + @JsonProperty(value = "isVisible") + private Boolean isVisible; + + /** + * 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() { + } +} 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 new file mode 100644 index 0000000000000..4fcac87001387 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Support topic information. */ +@Immutable +public final class DiagnosticSupportTopic { + /* + * Unique topic identifier + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * PES identifier + */ + @JsonProperty(value = "pesId", access = JsonProperty.Access.WRITE_ONLY) + private String pesId; + + /** + * 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() { + } +} 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 new file mode 100644 index 0000000000000..097fd4f2d489d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.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 new file mode 100644 index 0000000000000..855f169b1bcaf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.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 new file mode 100644 index 0000000000000..78546ed510a1b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics data returned from a detector. */ +@Fluent +public final class DiagnosticsDataApiResponse { + /* + * Table response + */ + @JsonProperty(value = "table") + private DiagnosticDataTableResponseObject table; + + /* + * Details of the table response + */ + @JsonProperty(value = "renderingProperties") + private DiagnosticRendering renderingProperties; + + /** + * 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(); + } + } +} 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 new file mode 100644 index 0000000000000..4fb714ae83c69 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Metadata of the diagnostics response. */ +@Fluent +public final class DiagnosticsDefinition { + /* + * Unique detector name + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Display Name of the detector + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Details of the diagnostics info + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Authors' names of the detector + */ + @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) + private String author; + + /* + * Category of the detector + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private String category; + + /* + * List of support topics + */ + @JsonProperty(value = "supportTopicList") + private List supportTopicList; + + /* + * List of analysis types + */ + @JsonProperty(value = "analysisTypes") + private List analysisTypes; + + /* + * Authors' names of the detector + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Authors' names of the detector + */ + @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY) + private Float score; + + /** + * 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()); + } + } +} 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 new file mode 100644 index 0000000000000..b2098a5927a6f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Diagnostics resource specific properties. */ +@Fluent +public final class DiagnosticsProperties { + /* + * Metadata of the diagnostics response. + */ + @JsonProperty(value = "metadata") + private DiagnosticsDefinition metadata; + + /* + * Set of data collections associated with the response. + */ + @JsonProperty(value = "dataset") + private List dataset; + + /* + * Status of the diagnostics response. + */ + @JsonProperty(value = "status") + private DiagnosticsStatus status; + + /* + * List of data providers' metadata. + */ + @JsonProperty(value = "dataProviderMetadata") + private DiagnosticDataProviderMetadata dataProviderMetadata; + + /** + * 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(); + } + } +} 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 new file mode 100644 index 0000000000000..bb36ff3e7be54 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rendering details of a diagnostics table. */ +@Fluent +public final class DiagnosticsStatus { + /* + * Diagnostic message + */ + @JsonProperty(value = "message") + private String message; + + /* + * Status + */ + @JsonProperty(value = "statusId") + private Integer statusId; + + /** + * 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() { + } +} 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 index 635453133af6c..be7d141905d1b 100644 --- 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 @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for DnsVerificationTestResult. */ +/** DNS verification test result. */ public enum DnsVerificationTestResult { /** Enum value Passed. */ PASSED("Passed"), @@ -33,6 +33,9 @@ public enum DnsVerificationTestResult { */ @JsonCreator public static DnsVerificationTestResult fromString(String value) { + if (value == null) { + return null; + } DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); for (DnsVerificationTestResult item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -42,6 +45,7 @@ public static DnsVerificationTestResult fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { 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 new file mode 100644 index 0000000000000..10f4f38fd2fe2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.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 index 2c2f4b4c9396a..aa7e68f3d523f 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EnvironmentProvisioningState. */ +/** Provisioning state of the Environment. */ public final class EnvironmentProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for EnvironmentProvisioningState. */ public static final EnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java new file mode 100644 index 0000000000000..783788c2f6090 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Managed Environment resource SKU properties. */ +@Fluent +public final class EnvironmentSkuProperties { + /* + * Name of the Sku. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /** + * Get the name property: Name of the Sku. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: Name of the Sku. + * + * @param name the name value to set. + * @return the EnvironmentSkuProperties object itself. + */ + public EnvironmentSkuProperties withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model EnvironmentSkuProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EnvironmentSkuProperties.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 index 68f15cc144789..b7603465274c1 100644 --- 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 @@ -23,8 +23,7 @@ public final class EnvironmentVar { private String value; /* - * Name of the Container App secret from which to pull the environment - * variable value. + * Name of the Container App secret from which to pull the environment variable value. */ @JsonProperty(value = "secretRef") private String secretRef; 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 new file mode 100644 index 0000000000000..3de38c3f6fd9f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The complex type of the extended location. */ +@Fluent +public final class ExtendedLocation { + /* + * The name of the extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the extended location. + */ + @JsonProperty(value = "type") + private ExtendedLocationTypes type; + + /** + * 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() { + } +} 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 new file mode 100644 index 0000000000000..2fa5af06d94da --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of extendedLocation. */ +public final class ExtendedLocationTypes extends ExpandableStringEnum { + /** Static value CustomLocation for ExtendedLocationTypes. */ + public static final ExtendedLocationTypes CUSTOM_LOCATION = fromString("CustomLocation"); + + /** + * Creates or finds a ExtendedLocationTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedLocationTypes. + */ + @JsonCreator + 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 index 156bdd036587f..44fe1582df4d7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java @@ -11,15 +11,14 @@ @Fluent public final class Facebook { /* - * false if the Facebook provider should not be enabled - * despite the set registration; otherwise, true. + * false if the Facebook provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the Facebook - * provider. + * The configuration settings of the app registration for the Facebook provider. */ @JsonProperty(value = "registration") private AppRegistration registration; 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 index 682f9dc4f3f64..67a969e08129c 100644 --- 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 @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ForwardProxyConvention. */ +/** The convention used to determine the url of the request made. */ public enum ForwardProxyConvention { /** Enum value NoProxy. */ NO_PROXY("NoProxy"), @@ -33,6 +33,9 @@ public enum ForwardProxyConvention { */ @JsonCreator public static ForwardProxyConvention fromString(String value) { + if (value == null) { + return null; + } ForwardProxyConvention[] items = ForwardProxyConvention.values(); for (ForwardProxyConvention item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -42,6 +45,7 @@ public static ForwardProxyConvention fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java index 3a909ed772350..f6c178bf27867 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java @@ -11,15 +11,14 @@ @Fluent public final class GitHub { /* - * false if the GitHub provider should not be enabled despite - * the set registration; otherwise, true. + * false if the GitHub provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the GitHub - * provider. + * The configuration settings of the app registration for the GitHub provider. */ @JsonProperty(value = "registration") private ClientRegistration registration; 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 index 62ed62bf27ef9..76ab8a2d98124 100644 --- 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 @@ -15,25 +15,21 @@ @Fluent public final class GlobalValidation { /* - * The action to take when an unauthenticated client attempts to access the - * app. + * The action to take when an unauthenticated client attempts to access the app. */ @JsonProperty(value = "unauthenticatedClientAction") 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 + * 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". */ @JsonProperty(value = "redirectToProvider") private String redirectToProvider; /* - * The paths for which unauthenticated flow would not be redirected to the - * login page. + * The paths for which unauthenticated flow would not be redirected to the login page. */ @JsonProperty(value = "excludedPaths") private List excludedPaths; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java index e054143330f3e..0a91403e9bb26 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java @@ -11,15 +11,14 @@ @Fluent public final class Google { /* - * false if the Google provider should not be enabled despite - * the set registration; otherwise, true. + * false if the Google provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the Google - * provider. + * The configuration settings of the app registration for the Google provider. */ @JsonProperty(value = "registration") private ClientRegistration registration; @@ -31,8 +30,7 @@ public final class Google { private LoginScopes login; /* - * The configuration settings of the Azure Active Directory token - * validation flow. + * The configuration settings of the Azure Active Directory token validation flow. */ @JsonProperty(value = "validation") private AllowedAudiencesValidation validation; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java index f7dd48a1dc477..afef5cd7a27b0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java @@ -10,7 +10,7 @@ import java.util.List; import java.util.Map; -/** Container App container Custom scaling rule. */ +/** Container App container Http scaling rule. */ @Fluent public final class HttpScaleRule { /* diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java index dceff513a349a..d88fdbe676803 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java @@ -14,8 +14,8 @@ @Fluent public final class HttpSettings { /* - * false if the authentication/authorization responses not - * having the HTTPS scheme are permissible; otherwise, true. + * false if the authentication/authorization responses not having the HTTPS scheme are permissible; + * otherwise, true. */ @JsonProperty(value = "requireHttps") private Boolean requireHttps; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java index 10778321bbc38..2d2973ea962e9 100644 --- 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 @@ -11,8 +11,7 @@ @Fluent public final class HttpSettingsRoutes { /* - * The prefix that should precede all the authentication/authorization - * paths. + * The prefix that should precede all the authentication/authorization paths. */ @JsonProperty(value = "apiPrefix") private String apiPrefix; 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 index 839f1ea096e56..cc4f5adf2de12 100644 --- 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 @@ -58,8 +58,7 @@ public final class IdentityProviders { private AzureStaticWebApps azureStaticWebApps; /* - * The map of the name of the alias of each custom Open ID Connect provider - * to the + * 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. */ @JsonProperty(value = "customOpenIdConnectProviders") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java index 1c041e51fc560..9e78b529eef9c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java @@ -29,6 +29,12 @@ public final class Ingress { @JsonProperty(value = "targetPort") private Integer targetPort; + /* + * Exposed Port in containers for TCP traffic from ingress + */ + @JsonProperty(value = "exposedPort") + private Integer exposedPort; + /* * Ingress transport protocol */ @@ -48,12 +54,18 @@ public final class Ingress { private List customDomains; /* - * Bool indicating if HTTP connections to is allowed. If set to false HTTP - * connections are automatically redirected to HTTPS connections + * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected + * to HTTPS connections */ @JsonProperty(value = "allowInsecure") private Boolean allowInsecure; + /* + * Rules to restrict incoming IP address. + */ + @JsonProperty(value = "ipSecurityRestrictions") + private List ipSecurityRestrictions; + /** * Get the fqdn property: Hostname. * @@ -103,6 +115,26 @@ public Ingress withTargetPort(Integer 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. * @@ -185,6 +217,26 @@ public Ingress withAllowInsecure(Boolean 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; + } + /** * Validates the instance. * @@ -197,5 +249,8 @@ public void validate() { if (customDomains() != null) { customDomains().forEach(e -> e.validate()); } + if (ipSecurityRestrictions() != null) { + ipSecurityRestrictions().forEach(e -> e.validate()); + } } } 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 index 04e6a2dce2942..23fbbd3f6f4d6 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IngressTransportMethod. */ +/** Ingress transport protocol. */ public final class IngressTransportMethod extends ExpandableStringEnum { /** Static value auto for IngressTransportMethod. */ public static final IngressTransportMethod AUTO = fromString("auto"); @@ -19,6 +19,9 @@ public final class IngressTransportMethod extends ExpandableStringEnum 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() { + super.validate(); + } +} 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 new file mode 100644 index 0000000000000..2e0f957ab4d40 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rule to restrict incoming IP address. */ +@Fluent +public final class IpSecurityRestrictionRule { + /* + * Name for the IP restriction rule. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Describe the IP restriction rule that is being sent to the container-app. This is an optional field. + */ + @JsonProperty(value = "description") + private String description; + + /* + * CIDR notation to match incoming IP address + */ + @JsonProperty(value = "ipAddressRange", required = true) + private String ipAddressRange; + + /* + * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny + */ + @JsonProperty(value = "action", required = true) + private Action action; + + /** + * 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 + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); + } + if (ipAddressRange() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); + } + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property action in model IpSecurityRestrictionRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpSecurityRestrictionRule.class); +} 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 new file mode 100644 index 0000000000000..cd0a46df20da9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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 or finds a LogLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogLevel. + */ + @JsonCreator + 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/Login.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java index ba800efe5120e..47f0dcdd1b4c2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java @@ -12,24 +12,22 @@ @Fluent public final class Login { /* - * The routes that specify the endpoints used for login and logout - * requests. + * The routes that specify the endpoints used for login and logout requests. */ @JsonProperty(value = "routes") private LoginRoutes routes; /* - * true if the fragments from the request are preserved after - * the login request is made; otherwise, false. + * true if the fragments from the request are preserved after the login request is made; otherwise, + * false. */ @JsonProperty(value = "preserveUrlFragmentsForLogins") private Boolean preserveUrlFragmentsForLogins; /* - * External URLs that can be redirected to as part of logging in or logging - * out of the app. Note that the query string part of the URL is ignored. - * This is an advanced setting typically only needed by Windows Store - * application backends. + * 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. */ @JsonProperty(value = "allowedExternalRedirectUrls") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java index ae6a433bef4c4..2e374db6f424d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java @@ -4,10 +4,12 @@ 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. */ @@ -47,6 +49,13 @@ public interface ManagedEnvironment { */ Map tags(); + /** + * Gets the sku property: SKU properties of the Environment. + * + * @return the sku value. + */ + EnvironmentSkuProperties sku(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -120,6 +129,27 @@ public interface ManagedEnvironment { */ 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 region of the resource. * @@ -194,11 +224,14 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithSku, DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, - DefinitionStages.WithZoneRedundant { + DefinitionStages.WithZoneRedundant, + DefinitionStages.WithCustomDomainConfiguration, + DefinitionStages.WithWorkloadProfiles { /** * Executes the create request. * @@ -224,6 +257,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ManagedEnvironment definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: SKU properties of the Environment.. + * + * @param sku SKU properties of the Environment. + * @return the next definition stage. + */ + WithCreate withSku(EnvironmentSkuProperties sku); + } /** The stage of the ManagedEnvironment definition allowing to specify daprAIInstrumentationKey. */ interface WithDaprAIInstrumentationKey { /** @@ -280,6 +323,26 @@ interface WithZoneRedundant { */ 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); + } } /** * Begins update for the ManagedEnvironment resource. @@ -290,7 +353,14 @@ interface WithZoneRedundant { /** The template for ManagedEnvironment update. */ interface Update - extends UpdateStages.WithTags, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration { + extends UpdateStages.WithTags, + UpdateStages.WithSku, + UpdateStages.WithDaprAIInstrumentationKey, + UpdateStages.WithDaprAIConnectionString, + UpdateStages.WithVnetConfiguration, + UpdateStages.WithAppLogsConfiguration, + UpdateStages.WithCustomDomainConfiguration, + UpdateStages.WithWorkloadProfiles { /** * Executes the update request. * @@ -318,6 +388,40 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ManagedEnvironment update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: SKU properties of the Environment.. + * + * @param sku SKU properties of the Environment. + * @return the next definition stage. + */ + Update withSku(EnvironmentSkuProperties sku); + } + /** 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 { /** @@ -340,6 +444,26 @@ interface WithAppLogsConfiguration { */ Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } + /** 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); + } } /** * Refreshes the resource to sync with Azure. @@ -355,4 +479,28 @@ interface WithAppLogsConfiguration { * @return the refreshed resource. */ ManagedEnvironment refresh(Context context); + + /** + * Get auth token for a managed environment + * + *

Checks if resource name is available. + * + * @throws com.azure.core.management.exception.ManagementException 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(); + + /** + * 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.core.management.exception.ManagementException 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); } 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 new file mode 100644 index 0000000000000..362649cbfb498 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 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 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java new file mode 100644 index 0000000000000..dc5d155af7619 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Outbound type for the cluster. */ +public final class ManagedEnvironmentOutBoundType extends ExpandableStringEnum { + /** Static value LoadBalancer for ManagedEnvironmentOutBoundType. */ + public static final ManagedEnvironmentOutBoundType LOAD_BALANCER = fromString("LoadBalancer"); + + /** Static value UserDefinedRouting for ManagedEnvironmentOutBoundType. */ + public static final ManagedEnvironmentOutBoundType USER_DEFINED_ROUTING = fromString("UserDefinedRouting"); + + /** + * Creates or finds a ManagedEnvironmentOutBoundType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedEnvironmentOutBoundType. + */ + @JsonCreator + public static ManagedEnvironmentOutBoundType fromString(String name) { + return fromString(name, ManagedEnvironmentOutBoundType.class); + } + + /** + * Gets known ManagedEnvironmentOutBoundType values. + * + * @return known ManagedEnvironmentOutBoundType values. + */ + public static Collection values() { + return values(ManagedEnvironmentOutBoundType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java new file mode 100644 index 0000000000000..4fd3a8c96c679 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration used to control the Environment Egress outbound traffic. */ +@Fluent +public final class ManagedEnvironmentOutboundSettings { + /* + * Outbound type for the cluster + */ + @JsonProperty(value = "outBoundType") + private ManagedEnvironmentOutBoundType outBoundType; + + /* + * Virtual Appliance IP used as the Egress controller for the Environment + */ + @JsonProperty(value = "virtualNetworkApplianceIp") + private String virtualNetworkApplianceIp; + + /** + * Get the outBoundType property: Outbound type for the cluster. + * + * @return the outBoundType value. + */ + public ManagedEnvironmentOutBoundType outBoundType() { + return this.outBoundType; + } + + /** + * Set the outBoundType property: Outbound type for the cluster. + * + * @param outBoundType the outBoundType value to set. + * @return the ManagedEnvironmentOutboundSettings object itself. + */ + public ManagedEnvironmentOutboundSettings withOutBoundType(ManagedEnvironmentOutBoundType outBoundType) { + this.outBoundType = outBoundType; + return this; + } + + /** + * Get the virtualNetworkApplianceIp property: Virtual Appliance IP used as the Egress controller for the + * Environment. + * + * @return the virtualNetworkApplianceIp value. + */ + public String virtualNetworkApplianceIp() { + return this.virtualNetworkApplianceIp; + } + + /** + * Set the virtualNetworkApplianceIp property: Virtual Appliance IP used as the Egress controller for the + * Environment. + * + * @param virtualNetworkApplianceIp the virtualNetworkApplianceIp value to set. + * @return the ManagedEnvironmentOutboundSettings object itself. + */ + public ManagedEnvironmentOutboundSettings withVirtualNetworkApplianceIp(String virtualNetworkApplianceIp) { + this.virtualNetworkApplianceIp = virtualNetworkApplianceIp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java index 2477278f7a9d2..5255879132561 100644 --- 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 @@ -12,7 +12,9 @@ /** Resource collection API of ManagedEnvironments. */ public interface ManagedEnvironments { /** - * Get all Managed Environments for a subscription. + * 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. @@ -22,7 +24,9 @@ public interface ManagedEnvironments { PagedIterable list(); /** - * Get all Managed Environments for a subscription. + * 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. @@ -34,7 +38,9 @@ public interface ManagedEnvironments { PagedIterable list(Context context); /** - * Get all the Managed Environments in a resource group. + * 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. @@ -46,7 +52,9 @@ public interface ManagedEnvironments { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get all the Managed Environments in a resource group. + * 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. @@ -59,7 +67,9 @@ public interface ManagedEnvironments { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -72,7 +82,9 @@ public interface ManagedEnvironments { ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName); /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -87,7 +99,9 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String environmentName, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -99,7 +113,9 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String environmentName); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -112,7 +128,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String environmentName, Context context); /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -125,7 +143,9 @@ Response getByResourceGroupWithResponse( void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Patches a Managed Environment using JSON Merge Patch. + * 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. @@ -140,7 +160,39 @@ void update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * 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.core.management.exception.ManagementException 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 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.core.management.exception.ManagementException 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 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. @@ -152,7 +204,9 @@ void update( ManagedEnvironment getById(String id); /** - * Get the properties of a Managed Environment used to host container apps. + * 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. @@ -165,7 +219,9 @@ void update( Response getByIdWithResponse(String id, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. @@ -176,7 +232,9 @@ void update( void deleteById(String id); /** - * Delete a Managed Environment if it does not have any container apps. + * 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. 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 new file mode 100644 index 0000000000000..1bc7e9e5b754c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java index 2b5d019da2832..5250763c9df86 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java @@ -15,30 +15,28 @@ @Fluent public class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property - * will only be provided for a system assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only - * be provided for a system assigned identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; /* - * Type of managed service identity (where both SystemAssigned and - * UserAssigned types are allowed). + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ @JsonProperty(value = "type", required = true) 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: + * 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. */ 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 index a76352c38df3f..b06d0fb6ca057 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedServiceIdentityType. */ +/** 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"); 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 index 31ec2a5bd7a8d..33caa710265c0 100644 --- 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 @@ -10,7 +10,9 @@ /** Resource collection API of Namespaces. */ public interface Namespaces { /** - * Checks if resource name is available. + * 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. @@ -25,7 +27,9 @@ CheckNameAvailabilityResponse checkNameAvailability( String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); /** - * Checks if resource name is available. + * 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. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java index fdb34ac0fe668..4e6591baf1564 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java @@ -11,8 +11,8 @@ @Fluent public final class Nonce { /* - * false if the nonce should not be validated while completing - * the login flow; otherwise, true. + * false if the nonce should not be validated while completing the login flow; otherwise, + * true. */ @JsonProperty(value = "validateNonce") private Boolean validateNonce; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java index b6bdca9cff8e7..e447a556082c1 100644 --- 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 @@ -17,8 +17,7 @@ public final class OpenIdConnectClientCredential { private ClientCredentialMethod method; /* - * The app setting that contains the client secret for the custom Open ID - * Connect provider. + * The app setting that contains the client secret for the custom Open ID Connect provider. */ @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java index 5c7e05a305dcc..ab349cbb45935 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java @@ -35,8 +35,7 @@ public final class OpenIdConnectConfig { private String certificationUri; /* - * The endpoint that contains all the configuration endpoints for the - * provider. + * The endpoint that contains all the configuration endpoints for the provider. */ @JsonProperty(value = "wellKnownOpenIdConfiguration") private String wellKnownOpenIdConfiguration; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java index 192a661f3b989..acf654b8ded42 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java @@ -23,8 +23,7 @@ public final class OpenIdConnectRegistration { private OpenIdConnectClientCredential clientCredential; /* - * The configuration settings of the endpoints used for the custom Open ID - * Connect provider. + * The configuration settings of the endpoints used for the custom Open ID Connect provider. */ @JsonProperty(value = "openIdConnectConfiguration") private OpenIdConnectConfig openIdConnectConfiguration; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java index 2ede306b687b1..40a50abfa8f06 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java @@ -29,9 +29,8 @@ public final class RegistryCredentials { private String passwordSecretRef; /* - * A Managed Identity to use to authenticate with Azure Container Registry. - * For user-assigned identities, use the full user-assigned identity - * Resource ID. For system-assigned identities, use 'system' + * A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the + * full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ @JsonProperty(value = "identity") private String identity; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java index 24b473e1d8266..3c66374c560b7 100644 --- 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 @@ -40,6 +40,18 @@ public final class ReplicaContainer { @JsonProperty(value = "restartCount") private Integer restartCount; + /* + * Log Stream endpoint + */ + @JsonProperty(value = "logStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String logStreamEndpoint; + + /* + * Container exec endpoint + */ + @JsonProperty(value = "execEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String execEndpoint; + /** * Get the name property: The Name of the Container. * @@ -140,6 +152,24 @@ public ReplicaContainer withRestartCount(Integer restartCount) { return this; } + /** + * 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; + } + /** * Validates the instance. * 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 index 23bd9205b40cd..dc40a43691f8f 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RevisionHealthState. */ +/** Current health State of the revision. */ public final class RevisionHealthState extends ExpandableStringEnum { /** Static value Healthy for RevisionHealthState. */ public static final RevisionHealthState HEALTHY = fromString("Healthy"); 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 index e34f70978f599..5f5205cd23215 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RevisionProvisioningState. */ +/** Current provisioning State of the revision. */ public final class RevisionProvisioningState extends ExpandableStringEnum { /** Static value Provisioning for RevisionProvisioningState. */ public static final RevisionProvisioningState PROVISIONING = fromString("Provisioning"); 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 index 2af107980c751..c1cc83350c77b 100644 --- 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 @@ -18,8 +18,7 @@ public final class Scale { private Integer minReplicas; /* - * Optional. Maximum number of container replicas. Defaults to 10 if not - * set. + * Optional. Maximum number of container replicas. Defaults to 10 if not set. */ @JsonProperty(value = "maxReplicas") private Integer maxReplicas; 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 index 363923140cb94..3a4da79c144ec 100644 --- 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 @@ -34,6 +34,12 @@ public final class ScaleRule { @JsonProperty(value = "http") private HttpScaleRule http; + /* + * Tcp requests based scaling. + */ + @JsonProperty(value = "tcp") + private TcpScaleRule tcp; + /** * Get the name property: Scale Rule Name. * @@ -114,6 +120,26 @@ public ScaleRule withHttp(HttpScaleRule 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. * @@ -129,5 +155,8 @@ public void validate() { if (http() != null) { http().validate(); } + if (tcp() != null) { + tcp().validate(); + } } } 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 index c561ce421911d..a6818740846ad 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Scheme. */ +/** 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"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java new file mode 100644 index 0000000000000..2f9018c8ebfff --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Name of the Sku. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Consumption for SkuName. */ + public static final SkuName CONSUMPTION = fromString("Consumption"); + + /** Static value Premium for SkuName. */ + public static final SkuName PREMIUM = fromString("Premium"); + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** + * Gets known SkuName values. + * + * @return known SkuName values. + */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/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 index efaab9ad14ef7..e99c063b3a2a0 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SourceControlOperationState. */ +/** 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"); 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 index 23beb970b46df..e1887e6837156 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StorageType. */ +/** 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"); 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 new file mode 100644 index 0000000000000..6cb5cfef4bba9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Container App container Tcp scaling rule. */ +@Fluent +public final class TcpScaleRule { + /* + * Metadata properties to describe tcp scale rule. + */ + @JsonProperty(value = "metadata") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map metadata; + + /* + * Authentication secrets for the tcp scale rule. + */ + @JsonProperty(value = "auth") + private List auth; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (auth() != null) { + auth().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java index 14758f6e7ba9a..8e4614457cf22 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java @@ -20,6 +20,12 @@ public final class Template { @JsonProperty(value = "revisionSuffix") private String revisionSuffix; + /* + * List of specialized containers that run before app containers. + */ + @JsonProperty(value = "initContainers") + private List initContainers; + /* * List of container definitions for the Container App. */ @@ -58,6 +64,26 @@ public Template withRevisionSuffix(String revisionSuffix) { return this; } + /** + * 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 Template object itself. + */ + public Template withInitContainers(List initContainers) { + this.initContainers = initContainers; + return this; + } + /** * Get the containers property: List of container definitions for the Container App. * @@ -124,6 +150,9 @@ public Template withVolumes(List volumes) { * @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()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java index 4e07b3aff83ee..b6f91e49b5fdf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java @@ -11,15 +11,14 @@ @Fluent public final class Twitter { /* - * false if the Twitter provider should not be enabled despite - * the set registration; otherwise, true. + * false if the Twitter provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the Twitter - * provider. + * The configuration settings of the app registration for the Twitter provider. */ @JsonProperty(value = "registration") private TwitterRegistration registration; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java index 37bf160c12b9d..0314f25bb5a1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java @@ -19,8 +19,7 @@ public final class TwitterRegistration { private String consumerKey; /* - * The app setting name that contains the OAuth 1.0a consumer secret of the - * Twitter + * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter * application used for sign-in. */ @JsonProperty(value = "consumerSecretSettingName") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java index fa69222e8fa19..f6780b693f9b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Type. */ +/** The type of probe. */ public final class Type extends ExpandableStringEnum { /** Static value Liveness for Type. */ public static final Type LIVENESS = fromString("Liveness"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java index a3a2fc415bfea..0cc5de4ca5213 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for UnauthenticatedClientActionV2. */ +/** The action to take when an unauthenticated client attempts to access the app. */ public enum UnauthenticatedClientActionV2 { /** Enum value RedirectToLoginPage. */ REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), @@ -36,6 +36,9 @@ public enum UnauthenticatedClientActionV2 { */ @JsonCreator public static UnauthenticatedClientActionV2 fromString(String value) { + if (value == null) { + return null; + } UnauthenticatedClientActionV2[] items = UnauthenticatedClientActionV2.values(); for (UnauthenticatedClientActionV2 item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -45,6 +48,7 @@ public static UnauthenticatedClientActionV2 fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java index 068b95ab5637c..b0cd62104d296 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java @@ -11,57 +11,57 @@ @Fluent public final class VnetConfiguration { /* - * Boolean indicating the environment only has an internal load balancer. - * These environments do not have a public static IP resource, must provide - * ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this - * property + * Boolean indicating the environment only has an internal load balancer. These environments do not have a public + * static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property */ @JsonProperty(value = "internal") private Boolean internal; /* - * Resource ID of a subnet for infrastructure components. This subnet must - * be in the same VNET as the subnet defined in runtimeSubnetId. Must not - * overlap with any other provided IP ranges. + * Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet + * defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ @JsonProperty(value = "infrastructureSubnetId") private String infrastructureSubnetId; /* - * Resource ID of a subnet that Container App containers are injected into. - * This subnet must be in the same VNET as the subnet defined in - * infrastructureSubnetId. Must not overlap with any other provided IP - * ranges. + * Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as + * the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ @JsonProperty(value = "runtimeSubnetId") private String runtimeSubnetId; /* - * CIDR notation IP range assigned to the Docker bridge, network. Must not - * overlap with any other provided IP ranges. + * CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP + * ranges. */ @JsonProperty(value = "dockerBridgeCidr") private String dockerBridgeCidr; /* - * IP range in CIDR notation that can be reserved for environment - * infrastructure IP addresses. Must not overlap with any other provided IP - * ranges. + * IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap + * with any other provided IP ranges. */ @JsonProperty(value = "platformReservedCidr") private String platformReservedCidr; /* - * An IP address from the IP range defined by platformReservedCidr that - * will be reserved for the internal DNS server. + * An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS + * server. */ @JsonProperty(value = "platformReservedDnsIP") private String platformReservedDnsIp; + /* + * Configuration used to control the Environment Egress outbound traffic + */ + @JsonProperty(value = "outboundSettings") + private ManagedEnvironmentOutboundSettings outboundSettings; + /** * Get the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and - * AppSubnetResourceId if enabling this property. + * environments do not have a public static IP resource. They must provide runtimeSubnetId and + * infrastructureSubnetId if enabling this property. * * @return the internal value. */ @@ -71,8 +71,8 @@ public Boolean internal() { /** * Set the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and - * AppSubnetResourceId if enabling this property. + * environments do not have a public static IP resource. They must provide runtimeSubnetId and + * infrastructureSubnetId if enabling this property. * * @param internal the internal value to set. * @return the VnetConfiguration object itself. @@ -194,11 +194,34 @@ public VnetConfiguration withPlatformReservedDnsIp(String platformReservedDnsIp) return this; } + /** + * Get the outboundSettings property: Configuration used to control the Environment Egress outbound traffic. + * + * @return the outboundSettings value. + */ + public ManagedEnvironmentOutboundSettings outboundSettings() { + return this.outboundSettings; + } + + /** + * Set the outboundSettings property: Configuration used to control the Environment Egress outbound traffic. + * + * @param outboundSettings the outboundSettings value to set. + * @return the VnetConfiguration object itself. + */ + public VnetConfiguration withOutboundSettings(ManagedEnvironmentOutboundSettings outboundSettings) { + this.outboundSettings = outboundSettings; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (outboundSettings() != null) { + outboundSettings().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java index 81c761c518024..5718251f03bf0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java @@ -17,8 +17,7 @@ public final class VolumeMount { private String volumeName; /* - * Path within the container at which the volume should be mounted.Must not - * contain ':'. + * Path within the container at which the volume should be mounted.Must not contain ':'. */ @JsonProperty(value = "mountPath") private String mountPath; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java new file mode 100644 index 0000000000000..111f5e28da695 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Workload profile to scope container app execution. */ +@Fluent +public final class WorkloadProfile { + /* + * Workload profile type for the workloads to run on. + */ + @JsonProperty(value = "workloadProfileType", required = true) + private String workloadProfileType; + + /* + * The minimum capacity. + */ + @JsonProperty(value = "minimumCount", required = true) + private int minimumCount; + + /* + * The maximum capacity. + */ + @JsonProperty(value = "maximumCount", required = true) + private int maximumCount; + + /** + * Get the workloadProfileType property: Workload profile type for the workloads to run on. + * + * @return the workloadProfileType value. + */ + public String workloadProfileType() { + return this.workloadProfileType; + } + + /** + * Set the workloadProfileType property: Workload profile type for the workloads to run on. + * + * @param workloadProfileType the workloadProfileType value to set. + * @return the WorkloadProfile object itself. + */ + public WorkloadProfile withWorkloadProfileType(String workloadProfileType) { + this.workloadProfileType = workloadProfileType; + return this; + } + + /** + * Get the minimumCount property: The minimum capacity. + * + * @return the minimumCount value. + */ + public int minimumCount() { + return this.minimumCount; + } + + /** + * Set the minimumCount property: The minimum capacity. + * + * @param minimumCount the minimumCount value to set. + * @return the WorkloadProfile object itself. + */ + public WorkloadProfile withMinimumCount(int minimumCount) { + this.minimumCount = minimumCount; + return this; + } + + /** + * Get the maximumCount property: The maximum capacity. + * + * @return the maximumCount value. + */ + public int maximumCount() { + return this.maximumCount; + } + + /** + * Set the maximumCount property: The maximum capacity. + * + * @param maximumCount the maximumCount value to set. + * @return the WorkloadProfile object itself. + */ + public WorkloadProfile withMaximumCount(int maximumCount) { + this.maximumCount = maximumCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (workloadProfileType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property workloadProfileType in model WorkloadProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadProfile.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index f32420e6af4eb..01c68c8b82cd7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java index 12b6d83e16def..ba5d9fdaca292 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java index 6279efd0587d8..8c03998b60ca9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java index de192f2ea9952..78d2e8e1bdbb5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java index 1780385c470d5..db66bc2a7f9df 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..0b2dd06451947 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; + +/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ +public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("private key password") + .withValue("PFX-or-PEM-blob".getBytes())), + Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java new file mode 100644 index 0000000000000..21e25b3fd21cf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Delete. */ +public final class ConnectedEnvironmentsCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java new file mode 100644 index 0000000000000..7516a6391ae80 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Get. */ +public final class ConnectedEnvironmentsCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java new file mode 100644 index 0000000000000..5b8c0e11d2f63 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates List. */ +public final class ConnectedEnvironmentsCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + */ + /** + * Sample code: List Certificates by Connected Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listCertificatesByConnectedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java new file mode 100644 index 0000000000000..c2ea3462e4953 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ConnectedEnvironmentsCertificates Update. */ +public final class ConnectedEnvironmentsCertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java new file mode 100644 index 0000000000000..eb7a2b950c5b9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; + +/** Samples for ConnectedEnvironments CheckNameAvailability. */ +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + */ + /** + * Sample code: Certificates_CheckNameAvailability. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void certificatesCheckNameAvailability( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironments() + .checkNameAvailabilityWithResponse( + "examplerg", + "testcontainerenv", + new CheckNameAvailabilityRequest() + .withName("testcertificatename") + .withType("Microsoft.App/connectedEnvironments/certificates"), + Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..07e512496af45 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for ConnectedEnvironments CreateOrUpdate. */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + */ + /** + * Sample code: Create kube environments. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironments() + .define("testenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..cd3fa3e3ef56b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; +import java.util.Arrays; + +/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ +public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + */ + /** + * Sample code: Create or update dapr component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java new file mode 100644 index 0000000000000..a69345b86f61d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ +public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + */ + /** + * Sample code: Delete dapr component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java new file mode 100644 index 0000000000000..d390a2855c97e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Get. */ +public final class ConnectedEnvironmentsDaprComponentsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + */ + /** + * Sample code: Get Dapr Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java new file mode 100644 index 0000000000000..128602c62d89d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents List. */ +public final class ConnectedEnvironmentsDaprComponentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + */ + /** + * Sample code: List Dapr Components. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java new file mode 100644 index 0000000000000..a61beb8526707 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ +public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + */ + /** + * Sample code: List Container Apps Secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listContainerAppsSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsDaprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java new file mode 100644 index 0000000000000..e9217065c241c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Delete. */ +public final class ConnectedEnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json + */ + /** + * Sample code: Delete connected environment by connectedEnvironmentName. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().delete("examplerg", "examplekenv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..a7d39482efc5c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments GetByResourceGroup. */ +public final class ConnectedEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json + */ + /** + * Sample code: Get connected environment by connectedEnvironmentName. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..82cc091edcaa1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments ListByResourceGroup. */ +public final class ConnectedEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + */ + /** + * Sample code: List environments by resource group. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsByResourceGroup( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().listByResourceGroup("examplerg", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java new file mode 100644 index 0000000000000..30f3f82abc13d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments List. */ +public final class ConnectedEnvironmentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + */ + /** + * Sample code: List connected environments by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listConnectedEnvironmentsBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().list(Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..48dd759809e9d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.AccessMode; +import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; + +/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ +public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + */ + /** + * Sample code: Create or update environments storage. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateEnvironmentsStorage( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsStorages() + .define("jlaw-demo1") + .withExistingConnectedEnvironment("examplerg", "env") + .withProperties( + new ConnectedEnvironmentStorageProperties() + .withAzureFile( + new AzureFileProperties() + .withAccountName("account1") + .withAccountKey("key") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java new file mode 100644 index 0000000000000..3d32e15e66d47 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages Delete. */ +public final class ConnectedEnvironmentsStoragesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + */ + /** + * Sample code: List environments storages by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java new file mode 100644 index 0000000000000..985b69a863c2b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages Get. */ +public final class ConnectedEnvironmentsStoragesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + */ + /** + * Sample code: get a environments storage properties by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAEnvironmentsStoragePropertiesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java new file mode 100644 index 0000000000000..7bc9c5c70084c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages List. */ +public final class ConnectedEnvironmentsStoragesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json + */ + /** + * Sample code: List environments storages by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java new file mode 100644 index 0000000000000..0ab238827263a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Update. */ +public final class ConnectedEnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json + */ + /** + * Sample code: Patch Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java index ae3c05b4fcd2b..2af3fe3a1f3db 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java index 100de975abd01..02b1f78b72172 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index a3b229eab31e0..eba01b17982f0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 2e075bb0d1fce..5151311e9b5e6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 01f361f3f654d..e60fa035af7a0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -11,12 +12,19 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; @@ -27,7 +35,7 @@ /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -41,8 +49,9 @@ public static void createOrUpdateContainerApp( .define("testcontainerApp0") .withRegion("East US") .withExistingResourceGroup("rg") - .withManagedEnvironmentId( + .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileType("GeneralPurpose") .withConfiguration( new Configuration() .withIngress( @@ -68,10 +77,43 @@ public static void createOrUpdateContainerApp( .withName("www.my-other-name.com") .withBindingType(BindingType.SNI_ENABLED) .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) .withTemplate( new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers( Arrays .asList( @@ -111,6 +153,67 @@ public static void createOrUpdateContainerApp( .create(); } + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Tcp App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerAppTcp") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerAppTcp-ab1234") + .withWeight(100))))) + .withTemplate( + new Template() + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerAppTcp:v1") + .withName("testcontainerAppTcp") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("tcpscalingrule") + .withTcp( + new TcpScaleRule() + .withMetadata(mapOf("concurrentConnections", "50"))))))) + .create(); + } + @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java index bde6e97ea925a..8add349fae66f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java new file mode 100644 index 0000000000000..33994d2b505ae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetDetector. */ +public final class ContainerAppsDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json + */ + /** + * Sample code: Get Container App's diagnostics info. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppSDiagnosticsInfo( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsDiagnostics() + .getDetectorWithResponse( + "mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java new file mode 100644 index 0000000000000..e5c4a81564578 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRevision. */ +public final class ContainerAppsDiagnosticsGetRevisionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + */ + /** + * Sample code: Get Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppSRevision( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsDiagnostics() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java new file mode 100644 index 0000000000000..e0c052a830ae8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRoot. */ +public final class ContainerAppsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + */ + /** + * Sample code: Get Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java new file mode 100644 index 0000000000000..94801afae7276 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListDetectors. */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json + */ + /** + * Sample code: Get the list of available diagnostics for a given Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsDiagnostics() + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java new file mode 100644 index 0000000000000..fecef91f927ae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListRevisions. */ +public final class ContainerAppsDiagnosticsListRevisionsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listContainerAppSRevisions( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java new file mode 100644 index 0000000000000..d12d281193dcd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerApps GetAuthToken. */ +public final class ContainerAppsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json + */ + /** + * Sample code: Get Container App Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java index 8c693e63ff7af..cd34f1b253fac 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java index 5dce39d0e3fba..5d328c5b2fb4c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java index a0f775c3c2b30..9a017f67da977 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index 6c5c0243b54a8..d885680399817 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java index 40a50a752a6fe..9a17fe1e8d4a9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index 11bfc8009ce76..f61fd0c8c7aec 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index 630f2ae298681..d8dd9e3f9dd67 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index 08235e1e1fc98..c874ecf8f9dbc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index c15271d947911..a50104cc55453 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index d8d564d918646..40770dc22e01f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 5324581d5a8b9..8b6e6137e0a5b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index cc55c0c2db001..75ec2cca6581a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index ab4193d13f6b5..b22cf60e93781 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java index 6b809a4f2c7a7..243a89a2b5382 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index 83e817f9115bf..c8e88ef5d8b36 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index aecbfe983746c..ed84c27a47b48 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index 5c4c90935a889..7c693a2a1f803 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java @@ -6,6 +6,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -13,10 +14,14 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; @@ -29,7 +34,7 @@ /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -70,10 +75,43 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withName("www.my-other-name.com") .withBindingType(BindingType.SNI_ENABLED) .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) .withTemplate( new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers( Arrays .asList( diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java index 34a651567bca7..ca9c24c4c77bf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java @@ -11,14 +11,14 @@ /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** - * Sample code: Create or update dapr component. + * Sample code: Create or update dapr component with secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponent( + public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() @@ -39,4 +39,34 @@ public static void createOrUpdateDaprComponent( .withScopes(Arrays.asList("container-app-1", "container-app-2")) .create(); } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + */ + /** + * Sample code: Create or update dapr component with secret store component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .daprComponents() + .define("reddog") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("my-secret-store") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index 1493afdd33442..b7da35a6649a4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index 23dd68e6619f6..43f1c579ea9d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -9,14 +9,28 @@ /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** - * Sample code: Get Dapr Component. + * Sample code: Get Dapr Component with secret store component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void getDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + */ + /** + * Sample code: Get Dapr Component with secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprComponentWithSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java index a2306a54f73bc..722a171a9c772 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index e8a47ef3f2687..f301616014cac 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java new file mode 100644 index 0000000000000..8f468b00f2e56 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ +public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + */ + /** + * Sample code: Get diagnostic data for a managed environments. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDiagnosticDataForAManagedEnvironments( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedEnvironmentDiagnostics() + .getDetectorWithResponse( + "mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java new file mode 100644 index 0000000000000..a85c61336f73d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ +public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + */ + /** + * Sample code: Get the list of available diagnostic data for a managed environments. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedEnvironmentDiagnostics() + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java index 6fd91f9b1ccab..750e5d106db96 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java @@ -5,12 +5,20 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; +import com.azure.resourcemanager.appcontainers.models.SkuName; +import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; +import java.util.Arrays; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -23,13 +31,40 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .define("testcontainerenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withVnetConfiguration( + new VnetConfiguration() + .withOutboundSettings( + new ManagedEnvironmentOutboundSettings() + .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) + .withVirtualNetworkApplianceIp("192.168.1.20"))) .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) .withZoneRedundant(true) + .withCustomDomainConfiguration( + new CustomDomainConfiguration() + .withDnsSuffix("www.my-name.com") + .withCertificateValue("PFX-or-PEM-blob".getBytes()) + .withCertificatePassword("private key password".getBytes())) + .withWorkloadProfiles( + Arrays + .asList( + new WorkloadProfile() + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile() + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile() + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java index 607d4c44bb7d1..4166699a9962c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java new file mode 100644 index 0000000000000..efb4da6fedf3f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ +public final class ManagedEnvironmentsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + */ + /** + * Sample code: Get environments by name. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java new file mode 100644 index 0000000000000..bdf62a7cc8a25 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironments GetAuthToken. */ +public final class ManagedEnvironmentsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json + */ + /** + * Sample code: Get Managed Environment Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getManagedEnvironmentAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java index dafccc1ccd56d..de387050cbce0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index d5cc68e7ea40a..56733c8475f41 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java index f33c68f8b9a5e..fb5a7e7e2aaf9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index df8dad2f96755..3bef9aeafacd4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java index bd34d5966e2d4..0425718576728 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index f0493b5be2bff..923f94843e836 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 41c79218d0770..10f08f791fee9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java index e0d5de098a3a1..99932fc462a6c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java index 353367eeff1ac..9fe9d81cd3863 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -31,7 +31,7 @@ public static void certificatesCheckNameAvailability( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java index 93c196bea0eb7..41eb1cd667b74 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations.