From cc8e71ed087ba3a54126afa8f4d5105486b5573e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 3 Feb 2023 02:00:11 +0000 Subject: [PATCH] CodeGen from PR 22426 in Azure/azure-rest-api-specs Merge 05b000505380b57b4dfb504d1ab0ba7e721ef3f2 into 6c1016865ea54b169825879b3bd993c0edd57852 --- .../CHANGELOG.md | 4 +- .../README.md | 27 +- .../SAMPLE.md | 1234 ++++++++------- .../pom.xml | 2 +- .../ContainerAppsApiManager.java | 226 +-- .../fluent/ContainerAppsApiClient.java | 105 +- .../fluent/ContainerAppsClient.java | 14 +- .../fluent/ManagedCertificatesClient.java | 231 +++ .../fluent/ManagedEnvironmentsClient.java | 15 +- .../fluent/models/ContainerAppInner.java | 41 + .../fluent/models/ContainerAppProperties.java | 15 + .../models/DaprSecretsCollectionInner.java | 8 +- .../models/ManagedCertificateInner.java | 86 ++ .../models/ManagedEnvironmentInner.java | 98 ++ .../models/ManagedEnvironmentProperties.java | 90 ++ .../AvailableWorkloadProfilesClientImpl.java | 2 +- .../BillingMetersClientImpl.java | 2 +- .../implementation/CertificateImpl.java | 36 +- .../CertificatesClientImpl.java | 2 +- .../implementation/CertificatesImpl.java | 172 +-- ...tedEnvironmentsCertificatesClientImpl.java | 2 +- ...ConnectedEnvironmentsCertificatesImpl.java | 182 ++- .../ConnectedEnvironmentsClientImpl.java | 12 +- ...dEnvironmentsDaprComponentsClientImpl.java | 2 +- ...nnectedEnvironmentsDaprComponentsImpl.java | 164 +- ...nnectedEnvironmentsStoragesClientImpl.java | 2 +- .../implementation/ContainerAppImpl.java | 17 +- .../ContainerAppsApiClientImpl.java | 198 +-- .../ContainerAppsAuthConfigsClientImpl.java | 2 +- .../ContainerAppsClientImpl.java | 69 +- .../ContainerAppsDiagnosticsClientImpl.java | 2 +- .../implementation/ContainerAppsImpl.java | 9 - ...ntainerAppsRevisionReplicasClientImpl.java | 2 +- .../ContainerAppsRevisionsClientImpl.java | 2 +- ...ContainerAppsSourceControlsClientImpl.java | 12 +- .../implementation/DaprComponentImpl.java | 41 +- .../DaprComponentsClientImpl.java | 2 +- .../implementation/DaprComponentsImpl.java | 158 +- .../DaprSecretsCollectionImpl.java | 6 +- .../ManagedCertificateImpl.java | 209 +++ .../ManagedCertificatesClientImpl.java | 1358 +++++++++++++++++ .../ManagedCertificatesImpl.java | 211 +++ ...nagedEnvironmentDiagnosticsClientImpl.java | 2 +- .../ManagedEnvironmentImpl.java | 43 +- .../ManagedEnvironmentsClientImpl.java | 73 +- ...agedEnvironmentsDiagnosticsClientImpl.java | 2 +- .../ManagedEnvironmentsImpl.java | 12 - ...ManagedEnvironmentsStoragesClientImpl.java | 2 +- .../implementation/NamespacesClientImpl.java | 2 +- .../implementation/OperationsClientImpl.java | 2 +- .../appcontainers/models/AccessMode.java | 9 + .../appcontainers/models/Action.java | 9 + .../models/ActiveRevisionsMode.java | 9 + .../appcontainers/models/Affinity.java | 47 + .../appcontainers/models/AppProtocol.java | 9 + .../appcontainers/models/Applicability.java | 9 + .../appcontainers/models/BindingType.java | 9 + .../appcontainers/models/Category.java | 9 + .../appcontainers/models/Certificate.java | 6 +- .../models/CertificateProvisioningState.java | 9 + .../appcontainers/models/Certificates.java | 84 +- .../models/CheckNameAvailabilityReason.java | 9 + ...ConnectedEnvironmentProvisioningState.java | 9 + .../ConnectedEnvironmentsCertificates.java | 87 +- .../ConnectedEnvironmentsDaprComponents.java | 100 +- .../appcontainers/models/ContainerApp.java | 48 + .../models/ContainerAppProvisioningState.java | 9 + .../appcontainers/models/ContainerApps.java | 33 - .../appcontainers/models/CorsPolicy.java | 189 +++ .../appcontainers/models/CustomDomain.java | 7 +- .../models/CustomDomainConfiguration.java | 10 +- .../appcontainers/models/DaprComponent.java | 6 +- .../appcontainers/models/DaprComponents.java | 100 +- .../models/DaprConfiguration.java | 39 + .../appcontainers/models/DaprSecret.java | 54 + .../models/DaprSecretsCollection.java | 2 +- .../models/EnvironmentProvisioningState.java | 9 + .../models/ExtendedLocationTypes.java | 9 + .../appcontainers/models/Ingress.java | 90 ++ .../models/IngressClientCertificateMode.java | 54 + .../models/IngressStickySessions.java | 50 + .../models/IngressTransportMethod.java | 9 + .../models/KedaConfiguration.java | 39 + .../appcontainers/models/LogLevel.java | 9 + .../models/ManagedCertificate.java | 225 +++ .../models/ManagedCertificateCollection.java | 78 + ...gedCertificateDomainControlValidation.java | 51 + .../models/ManagedCertificatePatch.java | 53 + .../models/ManagedCertificateProperties.java | 123 ++ .../models/ManagedCertificates.java | 155 ++ .../models/ManagedEnvironment.java | 120 +- .../ManagedEnvironmentOutBoundType.java | 9 + .../models/ManagedEnvironmentQuota.java | 53 + .../models/ManagedEnvironments.java | 33 - .../models/ManagedServiceIdentityType.java | 9 + .../appcontainers/models/QuotaStatus.java | 54 + .../models/RevisionHealthState.java | 9 + .../models/RevisionProvisioningState.java | 9 + .../appcontainers/models/Scheme.java | 9 + .../appcontainers/models/SkuName.java | 9 + .../models/SourceControlOperationState.java | 9 + .../appcontainers/models/StorageType.java | 9 + .../appcontainers/models/Type.java | 9 + .../models/VnetConfiguration.java | 14 +- .../AvailableWorkloadProfilesGetSamples.java | 6 +- .../generated/BillingMetersGetSamples.java | 6 +- .../CertificatesCreateOrUpdateSamples.java | 22 +- .../generated/CertificatesDeleteSamples.java | 7 +- .../generated/CertificatesGetSamples.java | 7 +- .../generated/CertificatesListSamples.java | 6 +- .../generated/CertificatesUpdateSamples.java | 19 +- ...entsCertificatesCreateOrUpdateSamples.java | 23 +- ...EnvironmentsCertificatesDeleteSamples.java | 7 +- ...tedEnvironmentsCertificatesGetSamples.java | 7 +- ...edEnvironmentsCertificatesListSamples.java | 8 +- ...EnvironmentsCertificatesUpdateSamples.java | 20 +- ...ironmentsCheckNameAvailabilitySamples.java | 5 +- ...ctedEnvironmentsCreateOrUpdateSamples.java | 4 +- ...tsDaprComponentsCreateOrUpdateSamples.java | 39 +- ...vironmentsDaprComponentsDeleteSamples.java | 6 +- ...dEnvironmentsDaprComponentsGetSamples.java | 6 +- ...EnvironmentsDaprComponentsListSamples.java | 8 +- ...mentsDaprComponentsListSecretsSamples.java | 6 +- .../ConnectedEnvironmentsDeleteSamples.java | 6 +- ...EnvironmentsGetByResourceGroupSamples.java | 8 +- ...nvironmentsListByResourceGroupSamples.java | 6 +- .../ConnectedEnvironmentsListSamples.java | 6 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 4 +- ...ctedEnvironmentsStoragesDeleteSamples.java | 8 +- ...nnectedEnvironmentsStoragesGetSamples.java | 8 +- ...nectedEnvironmentsStoragesListSamples.java | 8 +- .../ConnectedEnvironmentsUpdateSamples.java | 6 +- ...rAppsAuthConfigsCreateOrUpdateSamples.java | 6 +- ...ContainerAppsAuthConfigsDeleteSamples.java | 6 +- .../ContainerAppsAuthConfigsGetSamples.java | 6 +- ...sAuthConfigsListByContainerAppSamples.java | 8 +- .../ContainerAppsCreateOrUpdateSamples.java | 84 +- .../generated/ContainerAppsDeleteSamples.java | 6 +- ...inerAppsDiagnosticsGetDetectorSamples.java | 9 +- ...inerAppsDiagnosticsGetRevisionSamples.java | 7 +- ...ontainerAppsDiagnosticsGetRootSamples.java | 8 +- ...erAppsDiagnosticsListDetectorsSamples.java | 6 +- ...erAppsDiagnosticsListRevisionsSamples.java | 8 +- .../ContainerAppsGetAuthTokenSamples.java | 6 +- ...ontainerAppsGetByResourceGroupSamples.java | 8 +- ...ntainerAppsListByResourceGroupSamples.java | 6 +- ...AppsListCustomHostnameAnalysisSamples.java | 7 +- .../generated/ContainerAppsListSamples.java | 6 +- .../ContainerAppsListSecretsSamples.java | 6 +- ...AppsRevisionReplicasGetReplicaSamples.java | 10 +- ...psRevisionReplicasListReplicasSamples.java | 6 +- ...rAppsRevisionsActivateRevisionSamples.java | 7 +- ...ppsRevisionsDeactivateRevisionSamples.java | 7 +- ...tainerAppsRevisionsGetRevisionSamples.java | 7 +- ...inerAppsRevisionsListRevisionsSamples.java | 8 +- ...erAppsRevisionsRestartRevisionSamples.java | 7 +- ...psSourceControlsCreateOrUpdateSamples.java | 6 +- ...tainerAppsSourceControlsDeleteSamples.java | 8 +- ...ContainerAppsSourceControlsGetSamples.java | 6 +- ...urceControlsListByContainerAppSamples.java | 8 +- .../generated/ContainerAppsUpdateSamples.java | 208 +-- .../DaprComponentsCreateOrUpdateSamples.java | 75 +- .../DaprComponentsDeleteSamples.java | 8 +- .../generated/DaprComponentsGetSamples.java | 14 +- .../generated/DaprComponentsListSamples.java | 6 +- .../DaprComponentsListSecretsSamples.java | 8 +- ...agedCertificatesCreateOrUpdateSamples.java | 33 + .../ManagedCertificatesDeleteSamples.java | 23 + .../ManagedCertificatesGetSamples.java | 23 + .../ManagedCertificatesListSamples.java | 21 + .../ManagedCertificatesUpdateSamples.java | 41 + ...ironmentDiagnosticsGetDetectorSamples.java | 9 +- ...onmentDiagnosticsListDetectorsSamples.java | 6 +- ...agedEnvironmentsCreateOrUpdateSamples.java | 8 +- .../ManagedEnvironmentsDeleteSamples.java | 6 +- ...EnvironmentsDiagnosticsGetRootSamples.java | 8 +- ...anagedEnvironmentsGetAuthTokenSamples.java | 6 +- ...EnvironmentsGetByResourceGroupSamples.java | 8 +- ...nvironmentsListByResourceGroupSamples.java | 6 +- .../ManagedEnvironmentsListSamples.java | 6 +- ...mentsListWorkloadProfileStatesSamples.java | 8 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 4 +- ...agedEnvironmentsStoragesDeleteSamples.java | 8 +- ...ManagedEnvironmentsStoragesGetSamples.java | 8 +- ...anagedEnvironmentsStoragesListSamples.java | 8 +- .../ManagedEnvironmentsUpdateSamples.java | 20 +- ...amespacesCheckNameAvailabilitySamples.java | 9 +- .../generated/OperationsListSamples.java | 6 +- .../AllowedAudiencesValidationTests.java | 27 - .../generated/AllowedPrincipalsTests.java | 34 - .../generated/AppRegistrationTests.java | 30 - .../generated/AppleRegistrationTests.java | 31 - .../appcontainers/generated/AppleTests.java | 43 - .../generated/AuthConfigCollectionTests.java | 30 - .../generated/AuthConfigInnerTests.java | 80 - .../generated/AuthConfigPropertiesTests.java | 158 -- .../generated/AuthPlatformTests.java | 28 - .../generated/AvailableOperationsTests.java | 91 -- .../AvailableWorkloadProfileInnerTests.java | 51 - ...ailableWorkloadProfilePropertiesTests.java | 45 - ...ilableWorkloadProfilesCollectionTests.java | 70 - ...AvailableWorkloadProfilesGetMockTests.java | 79 - .../AzureActiveDirectoryLoginTests.java | 32 - ...AzureActiveDirectoryRegistrationTests.java | 46 - .../generated/AzureActiveDirectoryTests.java | 87 -- .../AzureActiveDirectoryValidationTests.java | 59 - .../AzureStaticWebAppsRegistrationTests.java | 26 - .../generated/AzureStaticWebAppsTests.java | 34 - .../generated/BaseContainerTests.java | 73 - .../BillingMeterCollectionInnerTests.java | 71 - .../BillingMeterPropertiesTests.java | 38 - .../generated/BillingMeterTests.java | 44 - .../generated/CertificatePatchTests.java | 53 - .../CheckNameAvailabilityRequestTests.java | 31 - ...eckNameAvailabilityResponseInnerTests.java | 37 - .../generated/ClientRegistrationTests.java | 31 - .../generated/ConfigurationTests.java | 183 --- .../ConnectedEnvironmentCollectionTests.java | 105 -- .../ConnectedEnvironmentInnerTests.java | 65 - .../ConnectedEnvironmentPropertiesTests.java | 38 - ...vironmentStoragesCollectionInnerTests.java | 39 - ...edEnvironmentsCreateOrUpdateMockTests.java | 100 -- ...vironmentsDaprComponentsListMockTests.java | 74 - .../ConnectedEnvironmentsDeleteMockTests.java | 62 - ...ironmentsListByResourceGroupMockTests.java | 77 - .../ConnectedEnvironmentsListMockTests.java | 76 - .../ContainerAppCollectionTests.java | 108 -- .../generated/ContainerAppInnerTests.java | 95 -- ...erAppProbeHttpGetHttpHeadersItemTests.java | 31 - .../ContainerAppProbeHttpGetTests.java | 55 - .../ContainerAppProbeTcpSocketTests.java | 31 - .../generated/ContainerAppProbeTests.java | 88 -- .../ContainerAppPropertiesTests.java | 225 --- .../generated/ContainerAppSecretTests.java | 25 - ...uthConfigsListByContainerAppMockTests.java | 78 - .../ContainerAppsCreateOrUpdateMockTests.java | 125 -- .../ContainerAppsDeleteMockTests.java | 62 - ...AppsDiagnosticsListDetectorsMockTests.java | 71 - ...AppsDiagnosticsListRevisionsMockTests.java | 66 - ...ainerAppsListByResourceGroupMockTests.java | 86 -- .../generated/ContainerAppsListMockTests.java | 85 -- ...erAppsRevisionsListRevisionsMockTests.java | 66 - ...SourceControlsCreateOrUpdateMockTests.java | 89 -- ...inerAppsSourceControlsDeleteMockTests.java | 62 - ...ceControlsListByContainerAppMockTests.java | 80 - .../generated/ContainerResourcesTests.java | 31 - .../generated/ContainerTests.java | 133 -- .../generated/CookieExpirationTests.java | 34 - .../CustomDomainConfigurationTests.java | 29 - .../generated/CustomDomainTests.java | 38 - .../generated/CustomScaleRuleTests.java | 60 - .../generated/DaprComponentInnerTests.java | 64 - .../DaprComponentPropertiesTests.java | 73 - .../DaprComponentsCollectionTests.java | 61 - .../DaprComponentsListMockTests.java | 73 - .../generated/DaprMetadataTests.java | 32 - .../DaprSecretsCollectionInnerTests.java | 40 - .../appcontainers/generated/DaprTests.java | 54 - .../DefaultAuthorizationPolicyTests.java | 41 - .../DefaultErrorResponseErrorTests.java | 23 - ...aProviderMetadataPropertyBagItemTests.java | 31 - .../DiagnosticDataProviderMetadataTests.java | 46 - ...iagnosticDataTableResponseColumnTests.java | 36 - ...iagnosticDataTableResponseObjectTests.java | 59 - .../generated/DiagnosticRenderingTests.java | 40 - .../DiagnosticSupportTopicTests.java | 25 - .../DiagnosticsCollectionInnerTests.java | 35 - .../DiagnosticsDataApiResponseTests.java | 73 - .../generated/DiagnosticsDefinitionTests.java | 34 - .../generated/DiagnosticsInnerTests.java | 59 - .../generated/DiagnosticsPropertiesTests.java | 115 -- .../generated/DiagnosticsStatusTests.java | 30 - .../EnvironmentSkuPropertiesTests.java | 27 - .../generated/EnvironmentVarTests.java | 33 - .../generated/ExtendedLocationTests.java | 32 - .../generated/FacebookTests.java | 45 - .../generated/ForwardProxyTests.java | 38 - .../appcontainers/generated/GitHubTests.java | 44 - .../generated/GlobalValidationTests.java | 39 - .../appcontainers/generated/GoogleTests.java | 49 - .../generated/HttpScaleRuleTests.java | 66 - .../generated/HttpSettingsRoutesTests.java | 26 - .../generated/HttpSettingsTests.java | 48 - .../appcontainers/generated/IngressTests.java | 103 -- .../generated/InitContainerTests.java | 74 - .../IpSecurityRestrictionRuleTests.java | 41 - .../generated/JwtClaimChecksTests.java | 35 - .../generated/LoginRoutesTests.java | 25 - .../generated/LoginScopesTests.java | 29 - .../appcontainers/generated/LoginTests.java | 55 - ...nagedEnvironmentOutboundSettingsTests.java | 34 - ...vironmentStoragesCollectionInnerTests.java | 41 - .../ManagedEnvironmentsDeleteMockTests.java | 62 - ...ntsListWorkloadProfileStatesMockTests.java | 71 - .../ManagedServiceIdentityTests.java | 56 - .../appcontainers/generated/NonceTests.java | 30 - .../OpenIdConnectClientCredentialTests.java | 34 - .../generated/OpenIdConnectLoginTests.java | 35 - .../generated/OperationDetailInnerTests.java | 52 - .../generated/OperationDisplayTests.java | 40 - .../generated/OperationsListMockTests.java | 74 - .../generated/QueueScaleRuleTests.java | 45 - .../generated/RegistryCredentialsTests.java | 40 - .../generated/RegistryInfoTests.java | 37 - .../ReplicaCollectionInnerTests.java | 34 - .../generated/ReplicaContainerTests.java | 43 - .../generated/ReplicaInnerTests.java | 55 - .../generated/ReplicaPropertiesTests.java | 67 - .../generated/RevisionCollectionTests.java | 30 - .../generated/RevisionInnerTests.java | 26 - .../generated/RevisionPropertiesTests.java | 26 - .../generated/ScaleRuleAuthTests.java | 30 - .../generated/ScaleRuleTests.java | 120 -- .../appcontainers/generated/ScaleTests.java | 89 -- .../appcontainers/generated/SecretTests.java | 27 - .../SecretsCollectionInnerTests.java | 36 - .../SourceControlCollectionTests.java | 41 - .../generated/SourceControlInnerTests.java | 55 - .../generated/TcpScaleRuleTests.java | 57 - .../generated/TemplateTests.java | 158 -- .../generated/TrafficWeightTests.java | 40 - .../generated/UserAssignedIdentityTests.java | 22 - .../generated/VnetConfigurationTests.java | 56 - .../generated/VolumeMountTests.java | 30 - .../appcontainers/generated/VolumeTests.java | 34 - .../WorkloadProfileStatesCollectionTests.java | 46 - .../WorkloadProfileStatesInnerTests.java | 40 - .../WorkloadProfileStatesPropertiesTests.java | 36 - .../generated/WorkloadProfileTests.java | 37 - 329 files changed, 6503 insertions(+), 9936 deletions(-) create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentQuota.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QuotaStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 15db313586c7e..4df7d7cb45a27 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.5 (Unreleased) +## 1.0.0-beta.1 (2023-02-03) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-11. 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 a02875ec8d5db..94de788c2cfa0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ContainerAppsApi client library for Java. -This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. 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-11. 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.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index a72d4197cf51f..e5df81705dbb7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -105,6 +105,14 @@ - [List](#daprcomponents_list) - [ListSecrets](#daprcomponents_listsecrets) +## ManagedCertificates + +- [CreateOrUpdate](#managedcertificates_createorupdate) +- [Delete](#managedcertificates_delete) +- [Get](#managedcertificates_get) +- [List](#managedcertificates_list) +- [Update](#managedcertificates_update) + ## ManagedEnvironmentDiagnostics - [GetDetector](#managedenvironmentdiagnostics_getdetector) @@ -142,12 +150,10 @@ ### AvailableWorkloadProfiles_Get ```java -import com.azure.core.util.Context; - /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. @@ -155,7 +161,7 @@ public final class AvailableWorkloadProfilesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.availableWorkloadProfiles().get("East US", Context.NONE); + manager.availableWorkloadProfiles().get("East US", com.azure.core.util.Context.NONE); } } ``` @@ -163,12 +169,10 @@ public final class AvailableWorkloadProfilesGetSamples { ### BillingMeters_Get ```java -import com.azure.core.util.Context; - /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -176,7 +180,7 @@ public final class BillingMetersGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.billingMeters().getWithResponse("East US", Context.NONE); + manager.billingMeters().getWithResponse("East US", com.azure.core.util.Context.NONE); } } ``` @@ -184,12 +188,13 @@ public final class BillingMetersGetSamples { ### Certificates_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; 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/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -200,14 +205,17 @@ public final class CertificatesCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes())), + com.azure.core.util.Context.NONE); } } ``` @@ -215,12 +223,10 @@ public final class CertificatesCreateOrUpdateSamples { ### Certificates_Delete ```java -import com.azure.core.util.Context; - /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -230,7 +236,8 @@ public final class CertificatesDeleteSamples { public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .deleteWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` @@ -238,12 +245,10 @@ public final class CertificatesDeleteSamples { ### Certificates_Get ```java -import com.azure.core.util.Context; - /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -253,7 +258,8 @@ public final class CertificatesGetSamples { public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` @@ -261,12 +267,10 @@ public final class CertificatesGetSamples { ### Certificates_List ```java -import com.azure.core.util.Context; - /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -275,7 +279,7 @@ public final class CertificatesListSamples { */ public static void listCertificatesByManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().list("examplerg", "testcontainerenv", Context.NONE); + manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } ``` @@ -283,15 +287,14 @@ public final class CertificatesListSamples { ### Certificates_Update ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import java.util.HashMap; import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -299,12 +302,14 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager + .certificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -323,13 +328,12 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -346,7 +350,7 @@ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { new CheckNameAvailabilityRequest() .withName("testcertificatename") .withType("Microsoft.App/connectedEnvironments/certificates"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -359,7 +363,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -379,7 +383,7 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificatePassword("fakeTokenPlaceholder")) .create(); } } @@ -388,12 +392,10 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. @@ -402,7 +404,7 @@ public final class ConnectedEnvironmentsDeleteSamples { */ public static void deleteConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().delete("examplerg", "examplekenv", Context.NONE); + manager.connectedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } ``` @@ -410,12 +412,10 @@ public final class ConnectedEnvironmentsDeleteSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -424,7 +424,9 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public static void getConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", Context.NONE); + manager + .connectedEnvironments() + .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } ``` @@ -432,12 +434,10 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. @@ -446,7 +446,7 @@ public final class ConnectedEnvironmentsListSamples { */ public static void listConnectedEnvironmentsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().list(Context.NONE); + manager.connectedEnvironments().list(com.azure.core.util.Context.NONE); } } ``` @@ -454,12 +454,10 @@ public final class ConnectedEnvironmentsListSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -468,7 +466,7 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { */ public static void listEnvironmentsByResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().listByResourceGroup("examplerg", Context.NONE); + manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } ``` @@ -476,12 +474,10 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -490,7 +486,7 @@ public final class ConnectedEnvironmentsUpdateSamples { */ public static void patchManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", Context.NONE); + manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.Context.NONE); } } ``` @@ -498,14 +494,12 @@ public final class ConnectedEnvironmentsUpdateSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -516,17 +510,14 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { 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); + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingConnectedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties() + .withPassword("fakeTokenPlaceholder") + .withValue("PFX-or-PEM-blob".getBytes())) + .create(); } } ``` @@ -534,12 +525,10 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -549,7 +538,8 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsCertificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .deleteWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` @@ -557,12 +547,10 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -572,7 +560,8 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsCertificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` @@ -580,12 +569,10 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -594,7 +581,9 @@ public final class ConnectedEnvironmentsCertificatesListSamples { */ public static void listCertificatesByConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", Context.NONE); + manager + .connectedEnvironmentsCertificates() + .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } ``` @@ -602,15 +591,14 @@ public final class ConnectedEnvironmentsCertificatesListSamples { ### ConnectedEnvironmentsCertificates_Update ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import com.azure.resourcemanager.appcontainers.models.Certificate; 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -618,14 +606,13 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { * @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); + Certificate resource = + manager + .connectedEnvironmentsCertificates() + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") @@ -644,8 +631,6 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { ### 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; @@ -653,7 +638,7 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -664,25 +649,22 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { 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); + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); } } ``` @@ -690,12 +672,10 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -705,7 +685,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -713,12 +693,10 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -728,7 +706,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -736,12 +714,10 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -749,7 +725,9 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", Context.NONE); + manager + .connectedEnvironmentsDaprComponents() + .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` @@ -757,12 +735,10 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -773,7 +749,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -788,7 +764,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -806,7 +782,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); @@ -817,12 +793,10 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -831,7 +805,9 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + manager + .connectedEnvironmentsStorages() + .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -839,12 +815,10 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -853,7 +827,9 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + manager + .connectedEnvironmentsStorages() + .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -861,12 +837,10 @@ public final class ConnectedEnvironmentsStoragesGetSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -875,7 +849,9 @@ public final class ConnectedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); + manager + .connectedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } ``` @@ -884,6 +860,7 @@ public final class ConnectedEnvironmentsStoragesListSamples { ```java import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -893,10 +870,13 @@ 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.CorsPolicy; 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.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; @@ -914,7 +894,7 @@ import java.util.Map; /** 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -971,7 +951,17 @@ public final class ContainerAppsCreateOrUpdateSamples { .withDescription( "Allowing all IP's within the subnet below to access containerapp") .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy( + new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true))) .withDapr( new Dapr() .withEnabled(true) @@ -1033,7 +1023,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -1093,6 +1083,70 @@ public final class ContainerAppsCreateOrUpdateSamples { .create(); } + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update ManagedBy App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateManagedByApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerAppManagedBy") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerAppManagedBy-ab1234") + .withWeight(100))))) + .withTemplate( + new Template() + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerAppManagedBy:v1") + .withName("testcontainerAppManagedBy") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("tcpscalingrule") + .withTcp( + new TcpScaleRule() + .withMetadata(mapOf("concurrentConnections", "50"))))))) + .create(); + } + @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1109,12 +1163,10 @@ public final class ContainerAppsCreateOrUpdateSamples { ### ContainerApps_Delete ```java -import com.azure.core.util.Context; - /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -1122,7 +1174,7 @@ public final class ContainerAppsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().delete("rg", "testWorkerApp0", Context.NONE); + manager.containerApps().delete("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); } } ``` @@ -1130,12 +1182,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -1144,7 +1194,7 @@ public final class ContainerAppsGetAuthTokenSamples { */ public static void getContainerAppAuthToken( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", Context.NONE); + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` @@ -1152,12 +1202,10 @@ public final class ContainerAppsGetAuthTokenSamples { ### ContainerApps_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1165,7 +1213,9 @@ public final class ContainerAppsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE); + manager + .containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` @@ -1173,12 +1223,10 @@ public final class ContainerAppsGetByResourceGroupSamples { ### ContainerApps_List ```java -import com.azure.core.util.Context; - /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -1187,7 +1235,7 @@ public final class ContainerAppsListSamples { */ public static void listContainerAppsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().list(Context.NONE); + manager.containerApps().list(com.azure.core.util.Context.NONE); } } ``` @@ -1195,12 +1243,10 @@ public final class ContainerAppsListSamples { ### ContainerApps_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -1209,7 +1255,7 @@ public final class ContainerAppsListByResourceGroupSamples { */ public static void listContainerAppsByResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listByResourceGroup("rg", Context.NONE); + manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` @@ -1217,12 +1263,10 @@ public final class ContainerAppsListByResourceGroupSamples { ### ContainerApps_ListCustomHostnameAnalysis ```java -import com.azure.core.util.Context; - /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -1232,7 +1276,8 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerApps() - .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", Context.NONE); + .listCustomHostnameAnalysisWithResponse( + "rg", "testcontainerApp0", "my.name.corp", com.azure.core.util.Context.NONE); } } ``` @@ -1240,12 +1285,10 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { ### ContainerApps_ListSecrets ```java -import com.azure.core.util.Context; - /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1254,7 +1297,7 @@ public final class ContainerAppsListSecretsSamples { */ public static void listContainerAppsSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", Context.NONE); + manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` @@ -1262,13 +1305,13 @@ public final class ContainerAppsListSecretsSamples { ### ContainerApps_Update ```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.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; @@ -1277,6 +1320,7 @@ 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.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; @@ -1292,7 +1336,7 @@ import java.util.Map; /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -1300,163 +1344,164 @@ public final class ContainerAppsUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .update( - "rg", - "testcontainerApp0", - new ContainerAppInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) - .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( + ContainerApp resource = + manager + .containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withTraffic( Arrays .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( + new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains( 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"))))))), - 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; - } -} -``` - -### ContainerAppsAuthConfigs_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; - -/** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ -public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { - /* - * 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. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateContainerAppAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withPlatform(new AuthPlatform().withEnabled(true)) - .withGlobalValidation( - new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) - .withIdentityProviders( + new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain() + .withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) + .withTemplate( + new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withHttpGet( + new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays + .asList( + new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule() + .withType("http") + .withMetadata(mapOf("concurrentRequests", "50"))))))) + .apply(); + } + + @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; + } +} +``` + +### ContainerAppsAuthConfigs_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.AppRegistration; +import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.Facebook; +import com.azure.resourcemanager.appcontainers.models.GlobalValidation; +import com.azure.resourcemanager.appcontainers.models.IdentityProviders; +import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; + +/** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ +public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App AuthConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppAuthConfig( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerAppsAuthConfigs() + .define("current") + .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders( new IdentityProviders() .withFacebook( new Facebook() .withRegistration( - new AppRegistration().withAppId("123").withAppSecretSettingName("facebook-secret")))) + new AppRegistration() + .withAppId("123") + .withAppSecretSettingName("fakeTokenPlaceholder")))) .create(); } } @@ -1465,12 +1510,10 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { ### ContainerAppsAuthConfigs_Delete ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -1481,7 +1524,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsAuthConfigs() - .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -1489,12 +1532,10 @@ public final class ContainerAppsAuthConfigsDeleteSamples { ### ContainerAppsAuthConfigs_Get ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -1505,7 +1546,7 @@ public final class ContainerAppsAuthConfigsGetSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsAuthConfigs() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -1513,12 +1554,10 @@ public final class ContainerAppsAuthConfigsGetSamples { ### ContainerAppsAuthConfigs_ListByContainerApp ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -1527,7 +1566,9 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { */ public static void listAuthConfigsByContainerApps( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", Context.NONE); + manager + .containerAppsAuthConfigs() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } ``` @@ -1535,12 +1576,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -1552,7 +1591,10 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { manager .containerAppsDiagnostics() .getDetectorWithResponse( - "mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", Context.NONE); + "mikono-workerapp-test-rg", + "mikono-capp-stage1", + "cappcontainerappnetworkIO", + com.azure.core.util.Context.NONE); } } ``` @@ -1560,12 +1602,10 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1576,7 +1616,8 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsDiagnostics() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .getRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } ``` @@ -1584,12 +1625,10 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1597,7 +1636,9 @@ public final class ContainerAppsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", Context.NONE); + manager + .containerAppsDiagnostics() + .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` @@ -1605,12 +1646,10 @@ public final class ContainerAppsDiagnosticsGetRootSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. @@ -1621,7 +1660,7 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsDiagnostics() - .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", Context.NONE); + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); } } ``` @@ -1629,12 +1668,10 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1643,7 +1680,9 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { */ public static void listContainerAppSRevisions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, Context.NONE); + manager + .containerAppsDiagnostics() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } ``` @@ -1651,12 +1690,10 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { ### ContainerAppsRevisionReplicas_GetReplica ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -1668,7 +1705,11 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { manager .containerAppsRevisionReplicas() .getReplicaWithResponse( - "workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", Context.NONE); + "workerapps-rg-xj", + "myapp", + "myapp--0wlqy09", + "myapp--0wlqy09-5d9774cff-5wnd8", + com.azure.core.util.Context.NONE); } } ``` @@ -1676,12 +1717,10 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { ### ContainerAppsRevisionReplicas_ListReplicas ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -1692,7 +1731,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisionReplicas() - .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", Context.NONE); + .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); } } ``` @@ -1700,12 +1739,10 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { ### ContainerAppsRevisions_ActivateRevision ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -1716,7 +1753,8 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .activateRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } ``` @@ -1724,12 +1762,10 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { ### ContainerAppsRevisions_DeactivateRevision ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -1740,7 +1776,8 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .deactivateRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } ``` @@ -1748,12 +1785,10 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { ### ContainerAppsRevisions_GetRevision ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1764,7 +1799,8 @@ public final class ContainerAppsRevisionsGetRevisionSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .getRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } ``` @@ -1772,12 +1808,10 @@ public final class ContainerAppsRevisionsGetRevisionSamples { ### ContainerAppsRevisions_ListRevisions ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1786,7 +1820,9 @@ public final class ContainerAppsRevisionsListRevisionsSamples { */ public static void listContainerAppSRevisions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, Context.NONE); + manager + .containerAppsRevisions() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } ``` @@ -1794,12 +1830,10 @@ public final class ContainerAppsRevisionsListRevisionsSamples { ### ContainerAppsRevisions_RestartRevision ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -1810,7 +1844,8 @@ public final class ContainerAppsRevisionsRestartRevisionSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", Context.NONE); + .restartRevisionWithResponse( + "rg", "testStaticSite0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } ``` @@ -1825,7 +1860,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/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -1846,11 +1881,11 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { new RegistryInfo() .withRegistryUrl("xwang971reg.azurecr.io") .withRegistryUsername("xwang971reg") - .withRegistryPassword("")) + .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials( new AzureCredentials() .withClientId("") - .withClientSecret("") + .withClientSecret("fakeTokenPlaceholder") .withTenantId("")) .withContextPath("./") .withImage("image/tag")) @@ -1862,12 +1897,10 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { ### ContainerAppsSourceControls_Delete ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -1876,7 +1909,9 @@ public final class ContainerAppsSourceControlsDeleteSamples { */ public static void deleteContainerAppSourceControl( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + manager + .containerAppsSourceControls() + .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -1884,12 +1919,10 @@ public final class ContainerAppsSourceControlsDeleteSamples { ### ContainerAppsSourceControls_Get ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -1900,7 +1933,7 @@ public final class ContainerAppsSourceControlsGetSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsSourceControls() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -1908,12 +1941,10 @@ public final class ContainerAppsSourceControlsGetSamples { ### ContainerAppsSourceControls_ListByContainerApp ```java -import com.azure.core.util.Context; - /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -1921,7 +1952,9 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", Context.NONE); + manager + .containerAppsSourceControls() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } ``` @@ -1929,6 +1962,7 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { ### DaprComponents_CreateOrUpdate ```java +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; @@ -1936,7 +1970,7 @@ import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -1947,26 +1981,29 @@ public final class DaprComponentsCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -1977,22 +2014,25 @@ public final class DaprComponentsCreateOrUpdateSamples { 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(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + com.azure.core.util.Context.NONE); } } ``` @@ -2000,12 +2040,10 @@ public final class DaprComponentsCreateOrUpdateSamples { ### DaprComponents_Delete ```java -import com.azure.core.util.Context; - /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -2013,7 +2051,9 @@ public final class DaprComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -2021,12 +2061,10 @@ public final class DaprComponentsDeleteSamples { ### DaprComponents_Get ```java -import com.azure.core.util.Context; - /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -2035,11 +2073,13 @@ public final class DaprComponentsGetSamples { */ public static void getDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -2048,7 +2088,9 @@ public final class DaprComponentsGetSamples { */ public static void getDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -2056,12 +2098,10 @@ public final class DaprComponentsGetSamples { ### DaprComponents_List ```java -import com.azure.core.util.Context; - /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -2069,7 +2109,7 @@ public final class DaprComponentsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().list("examplerg", "myenvironment", Context.NONE); + manager.daprComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` @@ -2077,12 +2117,10 @@ public final class DaprComponentsListSamples { ### DaprComponents_ListSecrets ```java -import com.azure.core.util.Context; - /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -2091,20 +2129,156 @@ public final class DaprComponentsListSecretsSamples { */ public static void listContainerAppsSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` -### ManagedEnvironmentDiagnostics_GetDetector +### ManagedCertificates_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.ManagedCertificateDomainControlValidation; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; + +/** Samples for ManagedCertificates CreateOrUpdate. */ +public final class ManagedCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_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 + .managedCertificates() + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new ManagedCertificateProperties() + .withSubjectName("my-subject-name.company.country.net") + .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) + .create(); + } +} +``` + +### ManagedCertificates_Delete ```java -import com.azure.core.util.Context; +/** Samples for ManagedCertificates Delete. */ +public final class ManagedCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedCertificates() + .deleteWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCertificates_Get +```java +/** Samples for ManagedCertificates Get. */ +public final class ManagedCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedCertificates() + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCertificates_List + +```java +/** Samples for ManagedCertificates List. */ +public final class ManagedCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json + */ + /** + * Sample code: List Managed Certificates by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listManagedCertificatesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedCertificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCertificates_Update + +```java +import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedCertificates Update. */ +public final class ManagedCertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ManagedCertificate resource = + manager + .managedCertificates() + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + @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; + } +} +``` + +### ManagedEnvironmentDiagnostics_GetDetector + +```java /** 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -2116,7 +2290,10 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { manager .managedEnvironmentDiagnostics() .getDetectorWithResponse( - "mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", Context.NONE); + "mikono-workerapp-test-rg", + "mikonokubeenv", + "ManagedEnvAvailabilityMetrics", + com.azure.core.util.Context.NONE); } } ``` @@ -2124,12 +2301,10 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { ### 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -2140,7 +2315,7 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", Context.NONE); + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", com.azure.core.util.Context.NONE); } } ``` @@ -2162,7 +2337,7 @@ import java.util.Arrays; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -2187,13 +2362,13 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration( new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles( Arrays .asList( @@ -2217,12 +2392,10 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { ### ManagedEnvironments_Delete ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -2231,7 +2404,7 @@ public final class ManagedEnvironmentsDeleteSamples { */ public static void deleteEnvironmentByName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().delete("examplerg", "examplekenv", Context.NONE); + manager.managedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } ``` @@ -2239,12 +2412,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -2253,7 +2424,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { */ public static void getManagedEnvironmentAuthToken( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", Context.NONE); + manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", com.azure.core.util.Context.NONE); } } ``` @@ -2261,12 +2432,10 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { ### ManagedEnvironments_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -2274,7 +2443,9 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", Context.NONE); + manager + .managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -2282,12 +2453,10 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { ### ManagedEnvironments_List ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -2296,7 +2465,7 @@ public final class ManagedEnvironmentsListSamples { */ public static void listEnvironmentsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().list(Context.NONE); + manager.managedEnvironments().list(com.azure.core.util.Context.NONE); } } ``` @@ -2304,12 +2473,10 @@ public final class ManagedEnvironmentsListSamples { ### ManagedEnvironments_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -2318,7 +2485,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { */ public static void listEnvironmentsByResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listByResourceGroup("examplerg", Context.NONE); + manager.managedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } ``` @@ -2326,12 +2493,10 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { ### ManagedEnvironments_ListWorkloadProfileStates ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -2340,7 +2505,9 @@ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { */ public static void listEnvironmentsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", Context.NONE); + manager + .managedEnvironments() + .listWorkloadProfileStates("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -2348,15 +2515,14 @@ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { ### ManagedEnvironments_Update ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import java.util.HashMap; import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -2365,15 +2531,12 @@ public final class ManagedEnvironmentsUpdateSamples { */ public static void patchManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .update( - "examplerg", - "testcontainerenv", - new ManagedEnvironmentInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); + ManagedEnvironment resource = + manager + .managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") @@ -2392,12 +2555,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -2405,7 +2566,9 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", Context.NONE); + manager + .managedEnvironmentsDiagnostics() + .getRootWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -2420,7 +2583,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/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -2438,7 +2601,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); @@ -2449,12 +2612,10 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { ### ManagedEnvironmentsStorages_Delete ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -2463,7 +2624,9 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", Context.NONE); + manager + .managedEnvironmentsStorages() + .deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -2471,12 +2634,10 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { ### ManagedEnvironmentsStorages_Get ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -2485,7 +2646,9 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", Context.NONE); + manager + .managedEnvironmentsStorages() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -2493,12 +2656,10 @@ public final class ManagedEnvironmentsStoragesGetSamples { ### ManagedEnvironmentsStorages_List ```java -import com.azure.core.util.Context; - /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -2507,7 +2668,9 @@ public final class ManagedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); + manager + .managedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } ``` @@ -2515,13 +2678,12 @@ public final class ManagedEnvironmentsStoragesListSamples { ### Namespaces_CheckNameAvailability ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -2538,11 +2700,11 @@ public final class NamespacesCheckNameAvailabilitySamples { new CheckNameAvailabilityRequest() .withName("testcertificatename") .withType("Microsoft.App/managedEnvironments/certificates"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -2557,7 +2719,7 @@ public final class NamespacesCheckNameAvailabilitySamples { "examplerg", "testcontainerenv", new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2565,12 +2727,10 @@ public final class NamespacesCheckNameAvailabilitySamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -2578,7 +2738,7 @@ public final class OperationsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 946639bf05991..c87e0b2784e38 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-preview-2022-06. + 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-11. 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 6af58a925aafd..8ec9c8d2510ad 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 @@ -39,6 +39,7 @@ 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.ManagedCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsImpl; @@ -59,6 +60,7 @@ 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.ManagedCertificates; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; @@ -76,14 +78,24 @@ public final class ContainerAppsApiManager { private ContainerAppsAuthConfigs containerAppsAuthConfigs; + private AvailableWorkloadProfiles availableWorkloadProfiles; + + private BillingMeters billingMeters; + + private ConnectedEnvironments connectedEnvironments; + + private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; + + private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; + + private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; + private ContainerApps containerApps; private ContainerAppsRevisions containerAppsRevisions; private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; - private DaprComponents daprComponents; - private ContainerAppsDiagnostics containerAppsDiagnostics; private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; @@ -96,24 +108,16 @@ public final class ContainerAppsApiManager { private Certificates certificates; + private ManagedCertificates managedCertificates; + private Namespaces namespaces; + private DaprComponents daprComponents; + private ManagedEnvironmentsStorages managedEnvironmentsStorages; private ContainerAppsSourceControls containerAppsSourceControls; - private ConnectedEnvironments connectedEnvironments; - - private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; - - private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; - - private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; - - private AvailableWorkloadProfiles availableWorkloadProfiles; - - private BillingMeters billingMeters; - private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -279,7 +283,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -349,6 +353,83 @@ public ContainerAppsAuthConfigs containerAppsAuthConfigs() { return containerAppsAuthConfigs; } + /** + * Gets the resource collection API of AvailableWorkloadProfiles. + * + * @return Resource collection API of AvailableWorkloadProfiles. + */ + public AvailableWorkloadProfiles availableWorkloadProfiles() { + if (this.availableWorkloadProfiles == null) { + this.availableWorkloadProfiles = + new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); + } + return availableWorkloadProfiles; + } + + /** + * Gets the resource collection API of BillingMeters. + * + * @return Resource collection API of BillingMeters. + */ + public BillingMeters billingMeters() { + if (this.billingMeters == null) { + this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); + } + return billingMeters; + } + + /** + * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. + * + * @return Resource collection API of ConnectedEnvironments. + */ + public ConnectedEnvironments connectedEnvironments() { + if (this.connectedEnvironments == null) { + this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); + } + return connectedEnvironments; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsCertificates. It manages Certificate. + * + * @return Resource collection API of ConnectedEnvironmentsCertificates. + */ + public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { + if (this.connectedEnvironmentsCertificates == null) { + this.connectedEnvironmentsCertificates = + new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); + } + return connectedEnvironmentsCertificates; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages DaprComponent. + * + * @return Resource collection API of ConnectedEnvironmentsDaprComponents. + */ + public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { + if (this.connectedEnvironmentsDaprComponents == null) { + this.connectedEnvironmentsDaprComponents = + new ConnectedEnvironmentsDaprComponentsImpl( + clientObject.getConnectedEnvironmentsDaprComponents(), this); + } + return connectedEnvironmentsDaprComponents; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. + * + * @return Resource collection API of ConnectedEnvironmentsStorages. + */ + public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { + if (this.connectedEnvironmentsStorages == null) { + this.connectedEnvironmentsStorages = + new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); + } + return connectedEnvironmentsStorages; + } + /** * Gets the resource collection API of ContainerApps. It manages ContainerApp. * @@ -387,18 +468,6 @@ public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { return containerAppsRevisionReplicas; } - /** - * Gets the resource collection API of DaprComponents. It manages DaprComponent. - * - * @return Resource collection API of DaprComponents. - */ - public DaprComponents daprComponents() { - if (this.daprComponents == null) { - this.daprComponents = new DaprComponentsImpl(clientObject.getDaprComponents(), this); - } - return daprComponents; - } - /** * Gets the resource collection API of ContainerAppsDiagnostics. * @@ -463,7 +532,7 @@ public ManagedEnvironments managedEnvironments() { } /** - * Gets the resource collection API of Certificates. It manages Certificate. + * Gets the resource collection API of Certificates. * * @return Resource collection API of Certificates. */ @@ -474,6 +543,18 @@ public Certificates certificates() { return certificates; } + /** + * Gets the resource collection API of ManagedCertificates. It manages ManagedCertificate. + * + * @return Resource collection API of ManagedCertificates. + */ + public ManagedCertificates managedCertificates() { + if (this.managedCertificates == null) { + this.managedCertificates = new ManagedCertificatesImpl(clientObject.getManagedCertificates(), this); + } + return managedCertificates; + } + /** * Gets the resource collection API of Namespaces. * @@ -486,6 +567,18 @@ public Namespaces namespaces() { return namespaces; } + /** + * Gets the resource collection API of DaprComponents. + * + * @return Resource collection API of DaprComponents. + */ + public DaprComponents daprComponents() { + if (this.daprComponents == null) { + this.daprComponents = new DaprComponentsImpl(clientObject.getDaprComponents(), this); + } + return daprComponents; + } + /** * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. * @@ -512,83 +605,6 @@ 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; - } - - /** - * Gets the resource collection API of AvailableWorkloadProfiles. - * - * @return Resource collection API of AvailableWorkloadProfiles. - */ - public AvailableWorkloadProfiles availableWorkloadProfiles() { - if (this.availableWorkloadProfiles == null) { - this.availableWorkloadProfiles = - new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); - } - return availableWorkloadProfiles; - } - - /** - * Gets the resource collection API of BillingMeters. - * - * @return Resource collection API of BillingMeters. - */ - public BillingMeters billingMeters() { - if (this.billingMeters == null) { - this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); - } - return billingMeters; - } - /** * @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/ContainerAppsApiClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java index b7f2855529f33..efabf4c1e55e4 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 @@ -51,6 +51,48 @@ public interface ContainerAppsApiClient { */ ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs(); + /** + * Gets the AvailableWorkloadProfilesClient object to access its operations. + * + * @return the AvailableWorkloadProfilesClient object. + */ + AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); + + /** + * Gets the BillingMetersClient object to access its operations. + * + * @return the BillingMetersClient object. + */ + BillingMetersClient getBillingMeters(); + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + ConnectedEnvironmentsClient getConnectedEnvironments(); + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); + /** * Gets the ContainerAppsClient object to access its operations. * @@ -72,13 +114,6 @@ public interface ContainerAppsApiClient { */ ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - DaprComponentsClient getDaprComponents(); - /** * Gets the ContainerAppsDiagnosticsClient object to access its operations. * @@ -121,6 +156,13 @@ public interface ContainerAppsApiClient { */ CertificatesClient getCertificates(); + /** + * Gets the ManagedCertificatesClient object to access its operations. + * + * @return the ManagedCertificatesClient object. + */ + ManagedCertificatesClient getManagedCertificates(); + /** * Gets the NamespacesClient object to access its operations. * @@ -128,6 +170,13 @@ public interface ContainerAppsApiClient { */ NamespacesClient getNamespaces(); + /** + * Gets the DaprComponentsClient object to access its operations. + * + * @return the DaprComponentsClient object. + */ + DaprComponentsClient getDaprComponents(); + /** * Gets the ManagedEnvironmentsStoragesClient object to access its operations. * @@ -141,46 +190,4 @@ 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(); - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - BillingMetersClient getBillingMeters(); } 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 bf77072df0afd..1e82557b5b6bc 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 @@ -231,10 +231,10 @@ ContainerAppInner createOrUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is 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. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** @@ -250,10 +250,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is 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. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** @@ -268,9 +268,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); + ContainerAppInner update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** * Update properties of a Container App @@ -285,9 +286,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( + ContainerAppInner update( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java new file mode 100644 index 0000000000000..af9961b0d7f32 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; + +/** An instance of this class provides access to all the operations defined in ManagedCertificatesClient. */ +public interface ManagedCertificatesClient { + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context); + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCertificateInner get(String resourceGroupName, String environmentName, String managedCertificateName); + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String managedCertificateName); + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context); + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCertificateInner createOrUpdate( + String resourceGroupName, String environmentName, String managedCertificateName); + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCertificateInner createOrUpdate( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context); + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context); + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String managedCertificateName); + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope, + Context context); + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCertificateInner update( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope); + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java index 12bb72b96036c..b2aa7dd534306 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 @@ -260,10 +260,10 @@ ManagedEnvironmentInner createOrUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is 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. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** @@ -279,10 +279,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is 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. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** @@ -297,9 +297,11 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); + ManagedEnvironmentInner update( + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** * Update Managed Environment's properties. @@ -314,9 +316,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( + ManagedEnvironmentInner update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** 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 0f37c337d0552..3683a5040a315 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 @@ -32,6 +32,14 @@ public final class ContainerAppInner extends Resource { @JsonProperty(value = "identity") private ManagedServiceIdentity identity; + /* + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is + * managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if + * it is removed from the template since it is managed by another resource. + */ + @JsonProperty(value = "managedBy") + private String managedBy; + /* * ContainerApp resource specific properties */ @@ -90,6 +98,30 @@ public ContainerAppInner withIdentity(ManagedServiceIdentity identity) { return this; } + /** + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @return the managedBy value. + */ + public String managedBy() { + return this.managedBy; + } + + /** + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @param managedBy the managedBy value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withManagedBy(String managedBy) { + this.managedBy = managedBy; + return this; + } + /** * Get the innerProperties property: ContainerApp resource specific properties. * @@ -209,6 +241,15 @@ public String latestRevisionName() { return this.innerProperties() == null ? null : this.innerProperties().latestRevisionName(); } + /** + * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. + * + * @return the latestReadyRevisionName value. + */ + public String latestReadyRevisionName() { + return this.innerProperties() == null ? null : this.innerProperties().latestReadyRevisionName(); + } + /** * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. * 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 b4f8ae444a422..68eda7b7394cd 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 @@ -44,6 +44,12 @@ public final class ContainerAppProperties { @JsonProperty(value = "latestRevisionName", access = JsonProperty.Access.WRITE_ONLY) private String latestRevisionName; + /* + * Name of the latest ready revision of the Container App. + */ + @JsonProperty(value = "latestReadyRevisionName", access = JsonProperty.Access.WRITE_ONLY) + private String latestReadyRevisionName; + /* * Fully Qualified Domain Name of the latest revision of the Container App. */ @@ -162,6 +168,15 @@ public String latestRevisionName() { return this.latestRevisionName; } + /** + * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. + * + * @return the latestReadyRevisionName value. + */ + public String latestReadyRevisionName() { + return this.latestReadyRevisionName; + } + /** * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java index 340ba9e1b5acc..72cdffb688012 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.models.Secret; +import com.azure.resourcemanager.appcontainers.models.DaprSecret; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,7 +17,7 @@ public final class DaprSecretsCollectionInner { * Collection of secrets used by a Dapr component */ @JsonProperty(value = "value", required = true) - private List value; + private List value; /** Creates an instance of DaprSecretsCollectionInner class. */ public DaprSecretsCollectionInner() { @@ -28,7 +28,7 @@ public DaprSecretsCollectionInner() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -38,7 +38,7 @@ public List value() { * @param value the value value to set. * @return the DaprSecretsCollectionInner object itself. */ - public DaprSecretsCollectionInner withValue(List value) { + public DaprSecretsCollectionInner withValue(List value) { this.value = value; return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java new file mode 100644 index 0000000000000..4854ffb18f62f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.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.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.ManagedCertificateProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ +@Fluent +public final class ManagedCertificateInner extends Resource { + /* + * Certificate resource specific properties + */ + @JsonProperty(value = "properties") + private ManagedCertificateProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ManagedCertificateInner class. */ + public ManagedCertificateInner() { + } + + /** + * Get the properties property: Certificate resource specific properties. + * + * @return the properties value. + */ + public ManagedCertificateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Certificate resource specific properties. + * + * @param properties the properties value to set. + * @return the ManagedCertificateInner object itself. + */ + public ManagedCertificateInner withProperties(ManagedCertificateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ManagedCertificateInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedCertificateInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} 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 a75d12a08e155..ddd82b17eb76d 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 @@ -9,8 +9,11 @@ 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.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; +import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentQuota; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; @@ -26,6 +29,12 @@ public final class ManagedEnvironmentInner extends Resource { @JsonProperty(value = "sku") private EnvironmentSkuProperties sku; + /* + * Kind of the Environment. + */ + @JsonProperty(value = "kind") + private String kind; + /* * Managed environment resource specific properties */ @@ -62,6 +71,26 @@ public ManagedEnvironmentInner withSku(EnvironmentSkuProperties sku) { return this; } + /** + * Get the kind property: Kind of the Environment. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of the Environment. + * + * @param kind the kind value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withKind(String kind) { + this.kind = kind; + return this; + } + /** * Get the innerProperties property: Managed environment resource specific properties. * @@ -306,6 +335,75 @@ public ManagedEnvironmentInner withWorkloadProfiles(List worklo return this; } + /** + * Get the kedaConfiguration property: The configuration of Keda component. + * + * @return the kedaConfiguration value. + */ + public KedaConfiguration kedaConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().kedaConfiguration(); + } + + /** + * Set the kedaConfiguration property: The configuration of Keda component. + * + * @param kedaConfiguration the kedaConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withKedaConfiguration(KedaConfiguration kedaConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withKedaConfiguration(kedaConfiguration); + return this; + } + + /** + * Get the daprConfiguration property: The configuration of Dapr component. + * + * @return the daprConfiguration value. + */ + public DaprConfiguration daprConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().daprConfiguration(); + } + + /** + * Set the daprConfiguration property: The configuration of Dapr component. + * + * @param daprConfiguration the daprConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withDaprConfiguration(DaprConfiguration daprConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withDaprConfiguration(daprConfiguration); + return this; + } + + /** + * Get the quotas property: Quota status for the environment. + * + * @return the quotas value. + */ + public ManagedEnvironmentQuota quotas() { + return this.innerProperties() == null ? null : this.innerProperties().quotas(); + } + + /** + * Set the quotas property: Quota status for the environment. + * + * @param quotas the quotas value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withQuotas(ManagedEnvironmentQuota quotas) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withQuotas(quotas); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java index 78ef578717a04..bfa9bd0db8f67 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 @@ -7,7 +7,10 @@ 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.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentQuota; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; @@ -90,6 +93,24 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "workloadProfiles") private List workloadProfiles; + /* + * The configuration of Keda component. + */ + @JsonProperty(value = "kedaConfiguration") + private KedaConfiguration kedaConfiguration; + + /* + * The configuration of Dapr component. + */ + @JsonProperty(value = "daprConfiguration") + private DaprConfiguration daprConfiguration; + + /* + * Quota status for the environment. + */ + @JsonProperty(value = "quotas") + private ManagedEnvironmentQuota quotas; + /** Creates an instance of ManagedEnvironmentProperties class. */ public ManagedEnvironmentProperties() { } @@ -286,6 +307,66 @@ public ManagedEnvironmentProperties withWorkloadProfiles(List w return this; } + /** + * Get the kedaConfiguration property: The configuration of Keda component. + * + * @return the kedaConfiguration value. + */ + public KedaConfiguration kedaConfiguration() { + return this.kedaConfiguration; + } + + /** + * Set the kedaConfiguration property: The configuration of Keda component. + * + * @param kedaConfiguration the kedaConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withKedaConfiguration(KedaConfiguration kedaConfiguration) { + this.kedaConfiguration = kedaConfiguration; + return this; + } + + /** + * Get the daprConfiguration property: The configuration of Dapr component. + * + * @return the daprConfiguration value. + */ + public DaprConfiguration daprConfiguration() { + return this.daprConfiguration; + } + + /** + * Set the daprConfiguration property: The configuration of Dapr component. + * + * @param daprConfiguration the daprConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withDaprConfiguration(DaprConfiguration daprConfiguration) { + this.daprConfiguration = daprConfiguration; + return this; + } + + /** + * Get the quotas property: Quota status for the environment. + * + * @return the quotas value. + */ + public ManagedEnvironmentQuota quotas() { + return this.quotas; + } + + /** + * Set the quotas property: Quota status for the environment. + * + * @param quotas the quotas value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withQuotas(ManagedEnvironmentQuota quotas) { + this.quotas = quotas; + return this; + } + /** * Validates the instance. * @@ -304,5 +385,14 @@ public void validate() { if (workloadProfiles() != null) { workloadProfiles().forEach(e -> e.validate()); } + if (kedaConfiguration() != null) { + kedaConfiguration().validate(); + } + if (daprConfiguration() != null) { + daprConfiguration().validate(); + } + if (quotas() != null) { + quotas().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java index 8a3a3e3b2b10a..1210677421782 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java @@ -57,7 +57,7 @@ public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkl */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface AvailableWorkloadProfilesService { + public interface AvailableWorkloadProfilesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java index 98f328927105f..ca38979de6dc2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java @@ -50,7 +50,7 @@ public final class BillingMetersClientImpl implements BillingMetersClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface BillingMetersService { + public interface BillingMetersService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters") @ExpectedResponses({200}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java index 0e95dfc5f0119..2c083dfc0e7c1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java @@ -74,15 +74,15 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String resourceGroupName; - private String environmentName; + private String connectedEnvironmentName; private String certificateName; private CertificatePatch updateCertificateEnvelope; - public CertificateImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + public CertificateImpl withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName) { this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; + this.connectedEnvironmentName = connectedEnvironmentName; return this; } @@ -90,9 +90,9 @@ public Certificate create() { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, this.innerModel(), Context.NONE) + resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -101,9 +101,9 @@ public Certificate create(Context context) { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, this.innerModel(), context) + resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), context) .getValue(); return this; } @@ -123,9 +123,13 @@ public Certificate apply() { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .updateWithResponse( - resourceGroupName, environmentName, certificateName, updateCertificateEnvelope, Context.NONE) + resourceGroupName, + connectedEnvironmentName, + certificateName, + updateCertificateEnvelope, + Context.NONE) .getValue(); return this; } @@ -134,9 +138,9 @@ public Certificate apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .updateWithResponse( - resourceGroupName, environmentName, certificateName, updateCertificateEnvelope, context) + resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, context) .getValue(); return this; } @@ -146,7 +150,7 @@ public Certificate apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); this.certificateName = Utils.getValueFromIdByName(innerObject.id(), "certificates"); } @@ -154,8 +158,8 @@ public Certificate refresh() { this.innerObject = serviceManager .serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE) + .getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) .getValue(); return this; } @@ -164,8 +168,8 @@ public Certificate refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, environmentName, certificateName, context) + .getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context) .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java index b3ab88433a8df..a94614bf4a5bb 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 @@ -60,7 +60,7 @@ public final class CertificatesClientImpl implements CertificatesClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface CertificatesService { + public interface CertificatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java index 86498b92b8eef..9a24cb875758a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import com.azure.resourcemanager.appcontainers.models.Certificates; public final class CertificatesImpl implements Certificates { @@ -62,6 +63,38 @@ public Certificate get(String resourceGroupName, String environmentName, String } } + public Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, environmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { + CertificateInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, environmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + public Response deleteWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, certificateName, context); @@ -71,116 +104,39 @@ public void delete(String resourceGroupName, String environmentName, String cert this.serviceClient().delete(resourceGroupName, environmentName, certificateName); } - public Certificate 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, certificateName, 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, certificateName, 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + public Response updateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, environmentName, certificateName, 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + public Certificate update( + String resourceGroupName, + String environmentName, + String certificateName, + CertificatePatch certificateEnvelope) { + CertificateInner inner = + this.serviceClient().update(resourceGroupName, environmentName, certificateName, certificateEnvelope); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, environmentName, certificateName, context); } private CertificatesClient serviceClient() { @@ -190,8 +146,4 @@ private CertificatesClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } - - public CertificateImpl define(String name) { - return new CertificateImpl(name, this.manager()); - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java index 4b0c4f9f133ee..d9e39127da08a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -66,7 +66,7 @@ public final class ConnectedEnvironmentsCertificatesClientImpl implements Connec */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsCertificatesService { + public interface ConnectedEnvironmentsCertificatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java index 851e484803652..6c5a00ced3de9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java @@ -12,7 +12,6 @@ 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 { @@ -64,39 +63,6 @@ public Certificate get(String resourceGroupName, String connectedEnvironmentName } } - 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 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 deleteWithResponse( String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { return this @@ -108,42 +74,122 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); } - 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; + public Certificate 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 certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) + .getValue(); } - public 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 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 certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); } + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + } + + public void deleteById(String id) { + String resourceGroupName = 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 certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = 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 certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); } private ConnectedEnvironmentsCertificatesClient serviceClient() { @@ -153,4 +199,8 @@ private ConnectedEnvironmentsCertificatesClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } + + public CertificateImpl define(String name) { + return new CertificateImpl(name, this.manager()); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java index c19ba549ecf2a..fbee79dd531b3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java @@ -68,7 +68,7 @@ public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironme */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsService { + public interface ConnectedEnvironmentsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments") @ExpectedResponses({200}) @@ -843,7 +843,8 @@ private PollerFlux, ConnectedEnvironmentIn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) .getSyncPoller(); } @@ -866,7 +867,8 @@ public SyncPoller, ConnectedEnvironmentInn String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) .getSyncPoller(); } @@ -1104,7 +1106,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName).getSyncPoller(); } /** @@ -1121,7 +1123,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String connectedEnvironmentName, Context context) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).getSyncPoller(); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java index bb0656b535b89..265101bc18ac1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -66,7 +66,7 @@ public final class ConnectedEnvironmentsDaprComponentsClientImpl implements Conn */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsDaprComponentsService { + public interface ConnectedEnvironmentsDaprComponentsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java index 14b9d452dbc31..a42732ed38b8c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java @@ -67,44 +67,6 @@ public DaprComponent get(String resourceGroupName, String connectedEnvironmentNa } } - 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 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 deleteWithResponse( String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { return this @@ -144,6 +106,128 @@ public DaprSecretsCollection listSecrets( } } + public DaprComponent 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 componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = 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 componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = 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 componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = 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 componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + private ConnectedEnvironmentsDaprComponentsClient serviceClient() { return this.innerClient; } @@ -151,4 +235,8 @@ private ConnectedEnvironmentsDaprComponentsClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } + + public DaprComponentImpl define(String name) { + return new DaprComponentImpl(name, this.manager()); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java index b74dc46476d27..4d52f5e2c09c0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -58,7 +58,7 @@ public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedE */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsStoragesService { + public interface ConnectedEnvironmentsStoragesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 26f5c8d21376b..26380caabfb38 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 @@ -60,6 +60,10 @@ public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String managedBy() { + return this.innerModel().managedBy(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -84,6 +88,10 @@ public String latestRevisionName() { return this.innerModel().latestRevisionName(); } + public String latestReadyRevisionName() { + return this.innerModel().latestReadyRevisionName(); + } + public String latestRevisionFqdn() { return this.innerModel().latestRevisionFqdn(); } @@ -175,7 +183,7 @@ public ContainerApp apply() { serviceManager .serviceClient() .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); + .update(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); return this; } @@ -184,7 +192,7 @@ public ContainerApp apply(Context context) { serviceManager .serviceClient() .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context); + .update(resourceGroupName, containerAppName, this.innerModel(), context); return this; } @@ -268,6 +276,11 @@ public ContainerAppImpl withIdentity(ManagedServiceIdentity identity) { return this; } + public ContainerAppImpl withManagedBy(String managedBy) { + this.innerModel().withManagedBy(managedBy); + return this; + } + public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { this.innerModel().withManagedEnvironmentId(managedEnvironmentId); return this; 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 ae4e2dfa8dc68..22b1bb80455dc 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 @@ -37,6 +37,7 @@ 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.ManagedCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; @@ -139,6 +140,78 @@ public ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs() { return this.containerAppsAuthConfigs; } + /** The AvailableWorkloadProfilesClient object to access its operations. */ + private final AvailableWorkloadProfilesClient availableWorkloadProfiles; + + /** + * Gets the AvailableWorkloadProfilesClient object to access its operations. + * + * @return the AvailableWorkloadProfilesClient object. + */ + public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { + return this.availableWorkloadProfiles; + } + + /** The BillingMetersClient object to access its operations. */ + private final BillingMetersClient billingMeters; + + /** + * Gets the BillingMetersClient object to access its operations. + * + * @return the BillingMetersClient object. + */ + public BillingMetersClient getBillingMeters() { + return this.billingMeters; + } + + /** The ConnectedEnvironmentsClient object to access its operations. */ + private final ConnectedEnvironmentsClient connectedEnvironments; + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + public ConnectedEnvironmentsClient getConnectedEnvironments() { + return this.connectedEnvironments; + } + + /** The ConnectedEnvironmentsCertificatesClient object to access its operations. */ + private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { + return this.connectedEnvironmentsCertificates; + } + + /** The ConnectedEnvironmentsDaprComponentsClient object to access its operations. */ + private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { + return this.connectedEnvironmentsDaprComponents; + } + + /** The ConnectedEnvironmentsStoragesClient object to access its operations. */ + private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { + return this.connectedEnvironmentsStorages; + } + /** The ContainerAppsClient object to access its operations. */ private final ContainerAppsClient containerApps; @@ -175,18 +248,6 @@ public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { return this.containerAppsRevisionReplicas; } - /** The DaprComponentsClient object to access its operations. */ - private final DaprComponentsClient daprComponents; - - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - public DaprComponentsClient getDaprComponents() { - return this.daprComponents; - } - /** The ContainerAppsDiagnosticsClient object to access its operations. */ private final ContainerAppsDiagnosticsClient containerAppsDiagnostics; @@ -259,6 +320,18 @@ public CertificatesClient getCertificates() { return this.certificates; } + /** The ManagedCertificatesClient object to access its operations. */ + private final ManagedCertificatesClient managedCertificates; + + /** + * Gets the ManagedCertificatesClient object to access its operations. + * + * @return the ManagedCertificatesClient object. + */ + public ManagedCertificatesClient getManagedCertificates() { + return this.managedCertificates; + } + /** The NamespacesClient object to access its operations. */ private final NamespacesClient namespaces; @@ -271,6 +344,18 @@ public NamespacesClient getNamespaces() { return this.namespaces; } + /** The DaprComponentsClient object to access its operations. */ + private final DaprComponentsClient daprComponents; + + /** + * Gets the DaprComponentsClient object to access its operations. + * + * @return the DaprComponentsClient object. + */ + public DaprComponentsClient getDaprComponents() { + return this.daprComponents; + } + /** The ManagedEnvironmentsStoragesClient object to access its operations. */ private final ManagedEnvironmentsStoragesClient managedEnvironmentsStorages; @@ -295,78 +380,6 @@ 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; - } - - /** The AvailableWorkloadProfilesClient object to access its operations. */ - private final AvailableWorkloadProfilesClient availableWorkloadProfiles; - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { - return this.availableWorkloadProfiles; - } - - /** The BillingMetersClient object to access its operations. */ - private final BillingMetersClient billingMeters; - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - public BillingMetersClient getBillingMeters() { - return this.billingMeters; - } - /** * Initializes an instance of ContainerAppsApiClient client. * @@ -389,27 +402,28 @@ public BillingMetersClient getBillingMeters() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-06-01-preview"; + this.apiVersion = "2022-11-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); + this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); + this.billingMeters = new BillingMetersClientImpl(this); + this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); this.containerApps = new ContainerAppsClientImpl(this); this.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.managedCertificates = new ManagedCertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); + this.daprComponents = new DaprComponentsClientImpl(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); - this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); - this.billingMeters = new BillingMetersClientImpl(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 7af8a2bde9c42..de270ec3acb3e 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 @@ -59,7 +59,7 @@ public final class ContainerAppsAuthConfigsClientImpl implements ContainerAppsAu */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsAuthConfigsService { + public interface ContainerAppsAuthConfigsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" 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 0aafa672aee81..e9c173e657123 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 @@ -69,7 +69,7 @@ public final class ContainerAppsClientImpl implements ContainerAppsClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsService { + public interface ContainerAppsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps") @ExpectedResponses({200}) @@ -143,7 +143,7 @@ Mono>> delete( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + "/{containerAppName}") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> update( @HostParam("$host") String endpoint, @@ -850,7 +850,7 @@ private PollerFlux, ContainerAppInner> beginCreate @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ContainerAppInner> beginCreateOrUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); } /** @@ -868,7 +868,8 @@ public SyncPoller, ContainerAppInner> beginCreateO @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ContainerAppInner> beginCreateOrUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) .getSyncPoller(); } @@ -1094,7 +1095,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName) { - return beginDeleteAsync(resourceGroupName, containerAppName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, containerAppName).getSyncPoller(); } /** @@ -1111,7 +1112,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String containerAppName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, containerAppName, context).getSyncPoller(); } /** @@ -1189,7 +1190,7 @@ public void delete(String resourceGroupName, String containerAppName, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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}. + * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1249,7 +1250,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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}. + * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1305,17 +1306,21 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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. + * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ContainerAppInner> beginUpdateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { Mono>> mono = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ContainerAppInner.class, + ContainerAppInner.class, + this.client.getContext()); } /** @@ -1330,17 +1335,18 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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. + * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ContainerAppInner> beginUpdateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); } /** @@ -1354,12 +1360,12 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); } /** @@ -1374,12 +1380,14 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).getSyncPoller(); + return this + .beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) + .getSyncPoller(); } /** @@ -1393,10 +1401,10 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope) .last() @@ -1415,10 +1423,10 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) .last() @@ -1436,10 +1444,12 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); + public ContainerAppInner update( + String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); } /** @@ -1454,11 +1464,12 @@ public void update(String resourceGroupName, String containerAppName, ContainerA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( + public ContainerAppInner update( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); + return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); } /** 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 index fa0c2d32eb4a7..7eda9e8c67370 100644 --- 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 @@ -60,7 +60,7 @@ public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDi */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsDiagnosticsService { + public interface ContainerAppsDiagnosticsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" 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 10d93f3c80fc7..2487493c7ff6a 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 @@ -86,15 +86,6 @@ public void delete(String resourceGroupName, String containerAppName, Context co this.serviceClient().delete(resourceGroupName, containerAppName, context); } - public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope); - } - - public void update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope, context); - } - public Response listCustomHostnameAnalysisWithResponse( String resourceGroupName, String containerAppName, String customHostname, Context context) { Response inner = diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java index 6b7ce6545dd60..838278de24ee3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java @@ -55,7 +55,7 @@ public final class ContainerAppsRevisionReplicasClientImpl implements ContainerA */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsRevisionReplicasService { + public interface ContainerAppsRevisionReplicasService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" 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 eb37e3d57d3ab..d0bc07ba4ae1e 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 @@ -57,7 +57,7 @@ public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevi */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsRevisionsService { + public interface ContainerAppsRevisionsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" 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 2d24f2d839e3d..72318a4ce3688 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 @@ -65,7 +65,7 @@ public final class ContainerAppsSourceControlsClientImpl implements ContainerApp */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsSourceControlsService { + public interface ContainerAppsSourceControlsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" @@ -697,7 +697,8 @@ public SyncPoller, SourceControlInner> beginCreat String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) + return this + .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) .getSyncPoller(); } @@ -721,7 +722,8 @@ public SyncPoller, SourceControlInner> beginCreat String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) .getSyncPoller(); } @@ -989,7 +991,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String containerAppName, String sourceControlName) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).getSyncPoller(); } /** @@ -1007,7 +1009,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).getSyncPoller(); } /** 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 0585f315609e4..f4699fac8b923 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 @@ -97,13 +97,14 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String resourceGroupName; - private String environmentName; + private String connectedEnvironmentName; private String componentName; - public DaprComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + public DaprComponentImpl withExistingConnectedEnvironment( + String resourceGroupName, String connectedEnvironmentName) { this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; + this.connectedEnvironmentName = connectedEnvironmentName; return this; } @@ -111,9 +112,9 @@ public DaprComponent create() { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -122,9 +123,9 @@ public DaprComponent create(Context context) { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), context) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context) .getValue(); return this; } @@ -143,9 +144,9 @@ public DaprComponent apply() { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -154,9 +155,9 @@ public DaprComponent apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), context) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context) .getValue(); return this; } @@ -167,7 +168,7 @@ public DaprComponent apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); this.componentName = Utils.getValueFromIdByName(innerObject.id(), "daprComponents"); } @@ -175,8 +176,8 @@ public DaprComponent refresh() { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() - .getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE) + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) .getValue(); return this; } @@ -185,20 +186,22 @@ public DaprComponent refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() - .getWithResponse(resourceGroupName, environmentName, componentName, context) + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context) .getValue(); return this; } public Response listSecretsWithResponse(Context context) { return serviceManager - .daprComponents() - .listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); + .connectedEnvironmentsDaprComponents() + .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); } public DaprSecretsCollection listSecrets() { - return serviceManager.daprComponents().listSecrets(resourceGroupName, environmentName, componentName); + return serviceManager + .connectedEnvironmentsDaprComponents() + .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); } public DaprComponentImpl withComponentType(String componentType) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java index 17ea587bad671..77a1262ca238d 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 @@ -60,7 +60,7 @@ public final class DaprComponentsClientImpl implements DaprComponentsClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface DaprComponentsService { + public interface DaprComponentsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java index 0be16fce31377..516bc044c8fe6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java @@ -65,6 +65,44 @@ public DaprComponent get(String resourceGroupName, String environmentName, Strin } } + public Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, daprComponentEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DaprComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprComponent createOrUpdate( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope) { + DaprComponentInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, environmentName, componentName, daprComponentEnvelope); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } + } + public Response deleteWithResponse( String resourceGroupName, String environmentName, String componentName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context); @@ -99,122 +137,6 @@ public DaprSecretsCollection listSecrets(String resourceGroupName, String enviro } } - public DaprComponent 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, componentName, 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, componentName, context); - } - private DaprComponentsClient serviceClient() { return this.innerClient; } @@ -222,8 +144,4 @@ private DaprComponentsClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } - - public DaprComponentImpl define(String name) { - return new DaprComponentImpl(name, this.manager()); - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java index e515816a4cfb0..444784c197fe4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; +import com.azure.resourcemanager.appcontainers.models.DaprSecret; import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Collections; import java.util.List; @@ -22,8 +22,8 @@ public final class DaprSecretsCollectionImpl implements DaprSecretsCollection { this.serviceManager = serviceManager; } - public List value() { - List inner = this.innerModel().value(); + public List value() { + List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java new file mode 100644 index 0000000000000..678fd7d6c7851 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; +import java.util.Collections; +import java.util.Map; + +public final class ManagedCertificateImpl + implements ManagedCertificate, ManagedCertificate.Definition, ManagedCertificate.Update { + private ManagedCertificateInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedCertificateProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ManagedCertificateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String managedCertificateName; + + private ManagedCertificatePatch updateManagedCertificateEnvelope; + + public ManagedCertificateImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public ManagedCertificate create() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCertificates() + .createOrUpdate( + resourceGroupName, environmentName, managedCertificateName, this.innerModel(), Context.NONE); + return this; + } + + public ManagedCertificate create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCertificates() + .createOrUpdate(resourceGroupName, environmentName, managedCertificateName, this.innerModel(), context); + return this; + } + + ManagedCertificateImpl( + String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new ManagedCertificateInner(); + this.serviceManager = serviceManager; + this.managedCertificateName = name; + } + + public ManagedCertificateImpl update() { + this.updateManagedCertificateEnvelope = new ManagedCertificatePatch(); + return this; + } + + public ManagedCertificate apply() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCertificates() + .updateWithResponse( + resourceGroupName, + environmentName, + managedCertificateName, + updateManagedCertificateEnvelope, + Context.NONE) + .getValue(); + return this; + } + + public ManagedCertificate apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCertificates() + .updateWithResponse( + resourceGroupName, + environmentName, + managedCertificateName, + updateManagedCertificateEnvelope, + context) + .getValue(); + return this; + } + + ManagedCertificateImpl( + ManagedCertificateInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.managedCertificateName = Utils.getValueFromIdByName(innerObject.id(), "managedCertificates"); + } + + public ManagedCertificate refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCertificates() + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE) + .getValue(); + return this; + } + + public ManagedCertificate refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCertificates() + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, context) + .getValue(); + return this; + } + + public ManagedCertificateImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ManagedCertificateImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ManagedCertificateImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateManagedCertificateEnvelope.withTags(tags); + return this; + } + } + + public ManagedCertificateImpl withProperties(ManagedCertificateProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java new file mode 100644 index 0000000000000..39625c9160dd6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java @@ -0,0 +1,1358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificateCollection; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ManagedCertificatesClient. */ +public final class ManagedCertificatesClientImpl implements ManagedCertificatesClient { + /** The proxy service used to perform REST calls. */ + private final ManagedCertificatesService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ManagedCertificatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedCertificatesClientImpl(ContainerAppsApiClientImpl client) { + this.service = + RestProxy.create(ManagedCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedCertificates to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ManagedCertificatesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("managedCertificateName") String managedCertificateName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("managedCertificateName") String managedCertificateName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedCertificateInner managedCertificateEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("managedCertificateName") String managedCertificateName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("managedCertificateName") String managedCertificateName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedCertificatePatch managedCertificateEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/managedCertificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String environmentName, String managedCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String environmentName, String managedCertificateName) { + return getWithResponseAsync(resourceGroupName, environmentName, managedCertificateName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, context).block(); + } + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCertificateInner get( + String resourceGroupName, String environmentName, String managedCertificateName) { + return getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE).getValue(); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + if (managedCertificateEnvelope != null) { + managedCertificateEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + managedCertificateEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + if (managedCertificateEnvelope != null) { + managedCertificateEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + managedCertificateEnvelope, + accept, + context); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope) { + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedCertificateInner.class, + ManagedCertificateInner.class, + this.client.getContext()); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, String environmentName, String managedCertificateName) { + final ManagedCertificateInner managedCertificateEnvelope = null; + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedCertificateInner.class, + ManagedCertificateInner.class, + this.client.getContext()); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedCertificateInner.class, + ManagedCertificateInner.class, + context); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String managedCertificateName) { + final ManagedCertificateInner managedCertificateEnvelope = null; + return this + .beginCreateOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) + .getSyncPoller(); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container + * Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) + .getSyncPoller(); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope) { + return beginCreateOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String environmentName, String managedCertificateName) { + final ManagedCertificateInner managedCertificateEnvelope = null; + return beginCreateOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCertificateInner createOrUpdate( + String resourceGroupName, String environmentName, String managedCertificateName) { + final ManagedCertificateInner managedCertificateEnvelope = null; + return createOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) + .block(); + } + + /** + * Create or Update a Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Managed Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCertificateInner createOrUpdate( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, + Context context) { + return createOrUpdateAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) + .block(); + } + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String environmentName, String managedCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String managedCertificateName) { + return deleteWithResponseAsync(resourceGroupName, environmentName, managedCertificateName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, context).block(); + } + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String managedCertificateName) { + deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE); + } + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + if (managedCertificateEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter managedCertificateEnvelope is required and cannot be null.")); + } else { + managedCertificateEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + managedCertificateEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (managedCertificateName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + } + if (managedCertificateEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter managedCertificateEnvelope is required and cannot be null.")); + } else { + managedCertificateEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + managedCertificateName, + this.client.getApiVersion(), + managedCertificateEnvelope, + accept, + context); + } + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope) { + return updateWithResponseAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope, + Context context) { + return updateWithResponseAsync( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) + .block(); + } + + /** + * Update tags of a managed certificate + * + *

Patches a managed certificate. Oly patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCertificateInner update( + String resourceGroupName, + String environmentName, + String managedCertificateName, + ManagedCertificatePatch managedCertificateEnvelope) { + return updateWithResponse( + resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, Context.NONE) + .getValue(); + } + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String environmentName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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 Managed Certificates along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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 Managed Certificates along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java new file mode 100644 index 0000000000000..d20f95e682ae3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; + +public final class ManagedCertificatesImpl implements ManagedCertificates { + private static final ClientLogger LOGGER = new ClientLogger(ManagedCertificatesImpl.class); + + private final ManagedCertificatesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedCertificatesImpl( + ManagedCertificatesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, environmentName, managedCertificateName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ManagedCertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedCertificate get(String resourceGroupName, String environmentName, String managedCertificateName) { + ManagedCertificateInner inner = + this.serviceClient().get(resourceGroupName, environmentName, managedCertificateName); + if (inner != null) { + return new ManagedCertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); + } + + public void delete(String resourceGroupName, String environmentName, String managedCertificateName) { + this.serviceClient().delete(resourceGroupName, environmentName, managedCertificateName); + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return Utils.mapPage(inner, inner1 -> new ManagedCertificateImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, environmentName, context); + return Utils.mapPage(inner, inner1 -> new ManagedCertificateImpl(inner1, this.manager())); + } + + public ManagedCertificate 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + if (managedCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + } + return this + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + if (managedCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, managedCertificateName, context); + } + + public void deleteById(String id) { + String resourceGroupName = 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + if (managedCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + } + this.deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = 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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + if (managedCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + } + return this.deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); + } + + private ManagedCertificatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public ManagedCertificateImpl define(String name) { + return new ManagedCertificateImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java index 0ece0ae0eada7..d80ef3ea1a5dc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java @@ -55,7 +55,7 @@ public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnv */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentDiagnosticsService { + public interface ManagedEnvironmentDiagnosticsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 9304a629fcf5d..225c691348904 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 @@ -11,10 +11,13 @@ 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.DaprConfiguration; 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.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentQuota; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; @@ -56,6 +59,10 @@ public EnvironmentSkuProperties sku() { return this.innerModel().sku(); } + public String kind() { + return this.innerModel().kind(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -113,6 +120,18 @@ public List workloadProfiles() { } } + public KedaConfiguration kedaConfiguration() { + return this.innerModel().kedaConfiguration(); + } + + public DaprConfiguration daprConfiguration() { + return this.innerModel().daprConfiguration(); + } + + public ManagedEnvironmentQuota quotas() { + return this.innerModel().quotas(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -176,7 +195,7 @@ public ManagedEnvironment apply() { serviceManager .serviceClient() .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE); + .update(resourceGroupName, environmentName, this.innerModel(), Context.NONE); return this; } @@ -185,7 +204,7 @@ public ManagedEnvironment apply(Context context) { serviceManager .serviceClient() .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context); + .update(resourceGroupName, environmentName, this.innerModel(), context); return this; } @@ -248,6 +267,11 @@ public ManagedEnvironmentImpl withSku(EnvironmentSkuProperties sku) { return this; } + public ManagedEnvironmentImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + public ManagedEnvironmentImpl withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { this.innerModel().withDaprAIInstrumentationKey(daprAIInstrumentationKey); return this; @@ -282,4 +306,19 @@ public ManagedEnvironmentImpl withWorkloadProfiles(List workloa this.innerModel().withWorkloadProfiles(workloadProfiles); return this; } + + public ManagedEnvironmentImpl withKedaConfiguration(KedaConfiguration kedaConfiguration) { + this.innerModel().withKedaConfiguration(kedaConfiguration); + return this; + } + + public ManagedEnvironmentImpl withDaprConfiguration(DaprConfiguration daprConfiguration) { + this.innerModel().withDaprConfiguration(daprConfiguration); + return this; + } + + public ManagedEnvironmentImpl withQuotas(ManagedEnvironmentQuota quotas) { + this.innerModel().withQuotas(quotas); + 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 2eeb567c9132b..f84344aa8d888 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 @@ -68,7 +68,7 @@ public final class ManagedEnvironmentsClientImpl implements ManagedEnvironmentsC */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsService { + public interface ManagedEnvironmentsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments") @ExpectedResponses({200}) @@ -144,7 +144,7 @@ Mono>> delete( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + "/managedEnvironments/{environmentName}") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> update( @HostParam("$host") String endpoint, @@ -904,7 +904,7 @@ private PollerFlux, ManagedEnvironmentInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); } /** @@ -927,7 +927,8 @@ public SyncPoller, ManagedEnvironmentInner> String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) .getSyncPoller(); } @@ -1176,7 +1177,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName) { - return beginDeleteAsync(resourceGroupName, environmentName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, environmentName).getSyncPoller(); } /** @@ -1195,7 +1196,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String environmentName, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, environmentName, context).getSyncPoller(); } /** @@ -1281,7 +1282,8 @@ public void delete(String resourceGroupName, String environmentName, Context con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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}. + * @return an environment for hosting container apps along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1341,7 +1343,8 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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}. + * @return an environment for hosting container apps along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1400,17 +1403,21 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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. + * @return the {@link PollerFlux} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { Mono>> mono = updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedEnvironmentInner.class, + ManagedEnvironmentInner.class, + this.client.getContext()); } /** @@ -1425,10 +1432,10 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown 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. + * @return the {@link PollerFlux} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, @@ -1438,7 +1445,12 @@ private PollerFlux, Void> beginUpdateAsync( updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedEnvironmentInner.class, + ManagedEnvironmentInner.class, + context); } /** @@ -1452,12 +1464,12 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); } /** @@ -1472,15 +1484,15 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).getSyncPoller(); } /** @@ -1494,10 +1506,10 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope) .last() @@ -1516,10 +1528,10 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, @@ -1540,10 +1552,12 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); + public ManagedEnvironmentInner update( + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + return updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); } /** @@ -1558,14 +1572,15 @@ public void update(String resourceGroupName, String environmentName, ManagedEnvi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( + public ManagedEnvironmentInner update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { - updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); + return updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); } /** 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 index 208603d332200..f8bfc998da936 100644 --- 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 @@ -54,7 +54,7 @@ public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEn */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsDiagnosticsService { + public interface ManagedEnvironmentsDiagnosticsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 19aa83d705b56..80f706e9a89c4 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 @@ -85,18 +85,6 @@ public void delete(String resourceGroupName, String environmentName, Context con this.serviceClient().delete(resourceGroupName, environmentName, context); } - public void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope); - } - - public void update( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope, context); - } - public Response getAuthTokenWithResponse( String resourceGroupName, String environmentName, Context context) { Response inner = diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java index ee07f227ead3b..d5892a64eab3e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java @@ -56,7 +56,7 @@ public final class ManagedEnvironmentsStoragesClientImpl implements ManagedEnvir */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsStoragesService { + public interface ManagedEnvironmentsStoragesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 88bc0b2704a94..c682983cdc57a 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 @@ -52,7 +52,7 @@ public final class NamespacesClientImpl implements NamespacesClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface NamespacesService { + public interface NamespacesService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 951798c3d460d..6f299e42cfedc 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 @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.App/operations") @ExpectedResponses({200}) 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 8f2d01d44becd..32fca9da968cb 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 @@ -16,6 +16,15 @@ public final class AccessMode extends ExpandableStringEnum { /** Static value ReadWrite for AccessMode. */ public static final AccessMode READ_WRITE = fromString("ReadWrite"); + /** + * Creates a new instance of AccessMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessMode() { + } + /** * Creates or finds a AccessMode from its string representation. * 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 index 08b42558079c6..03ba2ba32d115 100644 --- 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 @@ -16,6 +16,15 @@ public final class Action extends ExpandableStringEnum { /** Static value Deny for Action. */ public static final Action DENY = fromString("Deny"); + /** + * Creates a new instance of Action value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Action() { + } + /** * Creates or finds a Action from its string representation. * 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 1ade7f9c0e39e..7084cbc19dc93 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 @@ -21,6 +21,15 @@ public final class ActiveRevisionsMode extends ExpandableStringEnum { + /** Static value sticky for Affinity. */ + public static final Affinity STICKY = fromString("sticky"); + + /** Static value none for Affinity. */ + public static final Affinity NONE = fromString("none"); + + /** + * Creates a new instance of Affinity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Affinity() { + } + + /** + * Creates or finds a Affinity from its string representation. + * + * @param name a name to look for. + * @return the corresponding Affinity. + */ + @JsonCreator + public static Affinity fromString(String name) { + return fromString(name, Affinity.class); + } + + /** + * Gets known Affinity values. + * + * @return known Affinity values. + */ + public static Collection values() { + return values(Affinity.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java index 32c619fd30599..f4c1d5c4844bf 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 @@ -16,6 +16,15 @@ public final class AppProtocol extends ExpandableStringEnum { /** Static value grpc for AppProtocol. */ public static final AppProtocol GRPC = fromString("grpc"); + /** + * Creates a new instance of AppProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AppProtocol() { + } + /** * Creates or finds a AppProtocol from its string representation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java index 5da623ac844af..1eb2343792343 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java @@ -16,6 +16,15 @@ public final class Applicability extends ExpandableStringEnum { /** Static value Custom for Applicability. */ public static final Applicability CUSTOM = fromString("Custom"); + /** + * Creates a new instance of Applicability value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Applicability() { + } + /** * Creates or finds a Applicability from its string representation. * 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 675cbf07a216a..8e207dccbd689 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 @@ -16,6 +16,15 @@ public final class BindingType extends ExpandableStringEnum { /** Static value SniEnabled for BindingType. */ public static final BindingType SNI_ENABLED = fromString("SniEnabled"); + /** + * Creates a new instance of BindingType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BindingType() { + } + /** * Creates or finds a BindingType from its string representation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java index 0d54e4ba911ae..f13916d21d8bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java @@ -19,6 +19,15 @@ public final class Category extends ExpandableStringEnum { /** Static value PremiumSkuComputeOptimized for Category. */ public static final Category PREMIUM_SKU_COMPUTE_OPTIMIZED = fromString("PremiumSkuComputeOptimized"); + /** + * Creates a new instance of Category value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Category() { + } + /** * Creates or finds a Category from its string representation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java index d54e84215e265..25177f50653fe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java @@ -122,13 +122,13 @@ interface WithLocation { /** The stage of the Certificate definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, environmentName. + * Specifies resourceGroupName, connectedEnvironmentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. + * @param connectedEnvironmentName Name of the Connected Environment. * @return the next definition stage. */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); } /** * The stage of the Certificate definition which contains all the minimum required properties for the resource 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 af98d56fd8b83..65e92aa12643f 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 @@ -25,6 +25,15 @@ public final class CertificateProvisioningState extends ExpandableStringEnum getWithResponse( Certificate get(String resourceGroupName, String environmentName, String certificateName); /** - * Deletes the specified Certificate. + * Create or Update a Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context); /** - * Deletes the specified Certificate. + * Create or Update a Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -93,63 +100,78 @@ Response deleteWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.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. */ - void delete(String resourceGroupName, String environmentName, String certificateName); + Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName); /** - * Get the specified Certificate. + * Deletes the specified Certificate. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. + * @return the {@link Response}. */ - Certificate getById(String id); + Response deleteWithResponse( + String resourceGroupName, String environmentName, String certificateName, Context context); /** - * Get the specified Certificate. + * Deletes the specified Certificate. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + void delete(String resourceGroupName, String environmentName, String certificateName); /** - * Deletes the specified Certificate. + * Update properties of a certificate + * + *

Patches a certificate. Currently only patching of tags is supported. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. */ - void deleteById(String id); + Response updateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context); /** - * Deletes the specified Certificate. + * Update properties of a certificate * - * @param id the resource ID. - * @param context The context to associate with this operation. + *

Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Certificate resource. - * - * @param name resource name. - * @return the first stage of the new Certificate definition. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ - Certificate.DefinitionStages.Blank define(String name); + Certificate update( + String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java index 3a44345d05f54..3913496c6504e 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 @@ -16,6 +16,15 @@ public final class CheckNameAvailabilityReason extends ExpandableStringEnum getWithResponse( Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName); /** - * Create or Update a Certificate. + * 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 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}. + * @return the {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); + Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); /** - * Create or Update a Certificate. + * Deletes the specified Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. @@ -100,81 +93,63 @@ Response createOrUpdateWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.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); + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); /** - * Deletes the specified Certificate. + * 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. + * @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 {@link Response}. + * @return the specified Certificate along with {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + Certificate getById(String id); /** - * Deletes the specified Certificate. + * 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 id the resource ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate along with {@link Response}. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); + Response getByIdWithResponse(String id, Context context); /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. + * 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 certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. + * @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 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); + void deleteById(String id); /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. + * 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 certificateEnvelope Properties of a certificate that need to be updated. + * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Certificate resource. + * + * @param name resource name. + * @return the first stage of the new Certificate definition. */ - Certificate update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope); + Certificate.DefinitionStages.Blank define(String name); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java index aa40ae8d3ec6e..4e4afa80120f1 100644 --- 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 @@ -7,7 +7,6 @@ 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 { @@ -69,53 +68,40 @@ Response getWithResponse( DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName); /** - * Creates or updates a Dapr Component. + * Delete a Dapr Component. * - *

Creates or updates a Dapr Component in a connected environment. + *

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 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}. + * @return the {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); + Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); /** - * Creates or updates a Dapr Component. + * Delete a Dapr Component. * - *

Creates or updates a Dapr Component in a connected environment. + *

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 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); + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. + * 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. @@ -125,15 +111,13 @@ DaprComponent createOrUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown 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}. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ - Response deleteWithResponse( + Response listSecretsWithResponse( String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. + * 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. @@ -142,36 +126,68 @@ Response deleteWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); + DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); /** - * List secrets for a dapr component. + * 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 id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr component along with {@link Response}. + */ + DaprComponent getById(String id); + + /** + * Get a dapr component. + * + * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. + * @return a dapr component along with {@link Response}. */ - Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response getByIdWithResponse(String id, Context context); /** - * List secrets for a dapr component. + * Delete 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. + *

Delete a Dapr Component from a connected environment. + * + * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. */ - DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); + void deleteById(String id); + + /** + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a connected environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DaprComponent resource. + * + * @param name resource name. + * @return the first stage of the new DaprComponent definition. + */ + DaprComponent.DefinitionStages.Blank define(String name); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java index 58433c0677065..1bb9e26c60a8a 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 @@ -64,6 +64,15 @@ public interface ContainerApp { */ ManagedServiceIdentity identity(); + /** + * Gets the managedBy property: The fully qualified resource ID of the resource that manages this resource. + * Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another resource. + * + * @return the managedBy value. + */ + String managedBy(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -106,6 +115,13 @@ public interface ContainerApp { */ String latestRevisionName(); + /** + * Gets the latestReadyRevisionName property: Name of the latest ready revision of the Container App. + * + * @return the latestReadyRevisionName value. + */ + String latestReadyRevisionName(); + /** * Gets the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. * @@ -224,6 +240,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, DefinitionStages.WithIdentity, + DefinitionStages.WithManagedBy, DefinitionStages.WithManagedEnvironmentId, DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileType, @@ -276,6 +293,21 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ContainerApp definition allowing to specify managedBy. */ + interface WithManagedBy { + /** + * Specifies the managedBy property: The fully qualified resource ID of the resource that manages this + * resource. Indicates if this resource is managed by another Azure resource. If this is present, complete + * mode deployment will not delete the resource if it is removed from the template since it is managed by + * another resource.. + * + * @param managedBy The fully qualified resource ID of the resource that manages this resource. Indicates if + * this resource is managed by another Azure resource. If this is present, complete mode deployment will + * not delete the resource if it is removed from the template since it is managed by another resource. + * @return the next definition stage. + */ + WithCreate withManagedBy(String managedBy); + } /** The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ interface WithManagedEnvironmentId { /** @@ -339,6 +371,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, + UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileType, UpdateStages.WithConfiguration, UpdateStages.WithTemplate { @@ -391,6 +424,21 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ContainerApp update allowing to specify managedBy. */ + interface WithManagedBy { + /** + * Specifies the managedBy property: The fully qualified resource ID of the resource that manages this + * resource. Indicates if this resource is managed by another Azure resource. If this is present, complete + * mode deployment will not delete the resource if it is removed from the template since it is managed by + * another resource.. + * + * @param managedBy The fully qualified resource ID of the resource that manages this resource. Indicates if + * this resource is managed by another Azure resource. If this is present, complete mode deployment will + * not delete the resource if it is removed from the template since it is managed by another resource. + * @return the next definition stage. + */ + Update withManagedBy(String managedBy); + } /** The stage of the ContainerApp update allowing to specify workloadProfileType. */ interface WithWorkloadProfileType { /** 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 f1b0dfdbda2e5..f1017da4bd1d0 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 @@ -25,6 +25,15 @@ public final class ContainerAppProvisioningState extends ExpandableStringEnum getByResourceGroupWithResponse( */ void delete(String resourceGroupName, String containerAppName, Context context); - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - /** * Analyzes a custom hostname for a Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java new file mode 100644 index 0000000000000..1766d46a2fd2f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Cross-Origin-Resource-Sharing policy. */ +@Fluent +public final class CorsPolicy { + /* + * allowed origins + */ + @JsonProperty(value = "allowedOrigins", required = true) + private List allowedOrigins; + + /* + * allowed HTTP methods + */ + @JsonProperty(value = "allowedMethods") + private List allowedMethods; + + /* + * allowed HTTP headers + */ + @JsonProperty(value = "allowedHeaders") + private List allowedHeaders; + + /* + * expose HTTP headers + */ + @JsonProperty(value = "exposeHeaders") + private List exposeHeaders; + + /* + * max time client can cache the result + */ + @JsonProperty(value = "maxAge") + private Integer maxAge; + + /* + * allow credential or not + */ + @JsonProperty(value = "allowCredentials") + private Boolean allowCredentials; + + /** Creates an instance of CorsPolicy class. */ + public CorsPolicy() { + } + + /** + * Get the allowedOrigins property: allowed origins. + * + * @return the allowedOrigins value. + */ + public List allowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set the allowedOrigins property: allowed origins. + * + * @param allowedOrigins the allowedOrigins value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowedOrigins(List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get the allowedMethods property: allowed HTTP methods. + * + * @return the allowedMethods value. + */ + public List allowedMethods() { + return this.allowedMethods; + } + + /** + * Set the allowedMethods property: allowed HTTP methods. + * + * @param allowedMethods the allowedMethods value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowedMethods(List allowedMethods) { + this.allowedMethods = allowedMethods; + return this; + } + + /** + * Get the allowedHeaders property: allowed HTTP headers. + * + * @return the allowedHeaders value. + */ + public List allowedHeaders() { + return this.allowedHeaders; + } + + /** + * Set the allowedHeaders property: allowed HTTP headers. + * + * @param allowedHeaders the allowedHeaders value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowedHeaders(List allowedHeaders) { + this.allowedHeaders = allowedHeaders; + return this; + } + + /** + * Get the exposeHeaders property: expose HTTP headers. + * + * @return the exposeHeaders value. + */ + public List exposeHeaders() { + return this.exposeHeaders; + } + + /** + * Set the exposeHeaders property: expose HTTP headers. + * + * @param exposeHeaders the exposeHeaders value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withExposeHeaders(List exposeHeaders) { + this.exposeHeaders = exposeHeaders; + return this; + } + + /** + * Get the maxAge property: max time client can cache the result. + * + * @return the maxAge value. + */ + public Integer maxAge() { + return this.maxAge; + } + + /** + * Set the maxAge property: max time client can cache the result. + * + * @param maxAge the maxAge value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withMaxAge(Integer maxAge) { + this.maxAge = maxAge; + return this; + } + + /** + * Get the allowCredentials property: allow credential or not. + * + * @return the allowCredentials value. + */ + public Boolean allowCredentials() { + return this.allowCredentials; + } + + /** + * Set the allowCredentials property: allow credential or not. + * + * @param allowCredentials the allowCredentials value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowCredentials(Boolean allowCredentials) { + this.allowCredentials = allowCredentials; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (allowedOrigins() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property allowedOrigins in model CorsPolicy")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CorsPolicy.class); +} 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 c7e9540e075d3..a57a362a886de 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 @@ -26,7 +26,7 @@ public final class CustomDomain { /* * Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ - @JsonProperty(value = "certificateId", required = true) + @JsonProperty(value = "certificateId") private String certificateId; /** Creates an instance of CustomDomain class. */ @@ -106,11 +106,6 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property name in model CustomDomain")); } - if (certificateId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property certificateId in model CustomDomain")); - } } private static final ClientLogger LOGGER = new ClientLogger(CustomDomain.class); 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 index 2c403bd755ede..f6d0f7c4eae57 100644 --- 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 @@ -34,7 +34,7 @@ public final class CustomDomainConfiguration { * Certificate password */ @JsonProperty(value = "certificatePassword") - private byte[] certificatePassword; + private String certificatePassword; /* * Certificate expiration date. @@ -112,8 +112,8 @@ public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) { * * @return the certificatePassword value. */ - public byte[] certificatePassword() { - return CoreUtils.clone(this.certificatePassword); + public String certificatePassword() { + return this.certificatePassword; } /** @@ -122,8 +122,8 @@ public byte[] certificatePassword() { * @param certificatePassword the certificatePassword value to set. * @return the CustomDomainConfiguration object itself. */ - public CustomDomainConfiguration withCertificatePassword(byte[] certificatePassword) { - this.certificatePassword = CoreUtils.clone(certificatePassword); + public CustomDomainConfiguration withCertificatePassword(String certificatePassword) { + this.certificatePassword = certificatePassword; return this; } 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 b8d6168c573d1..68a8bcd7018d0 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 @@ -122,13 +122,13 @@ interface Blank extends WithParentResource { /** The stage of the DaprComponent definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, environmentName. + * Specifies resourceGroupName, connectedEnvironmentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. + * @param connectedEnvironmentName Name of the connected environment. * @return the next definition stage. */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); } /** * The stage of the DaprComponent definition which contains all the minimum required properties for the resource 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 43295443f0f0b..decfd9343fba5 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 @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; /** Resource collection API of DaprComponents. */ public interface DaprComponents { @@ -68,40 +69,53 @@ Response getWithResponse( DaprComponent get(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component. + * Creates or updates a Dapr Component. * - *

Delete a Dapr Component from a Managed Environment. + *

Creates or updates a Dapr Component in a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return dapr Component along with {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context); /** - * Delete a Dapr Component. + * Creates or updates a Dapr Component. * - *

Delete a Dapr Component from a Managed Environment. + *

Creates or updates a Dapr Component in a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component. */ - void delete(String resourceGroupName, String environmentName, String componentName); + DaprComponent createOrUpdate( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope); /** - * List secrets for a dapr component. + * 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. @@ -111,13 +125,15 @@ Response deleteWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. + * @return the {@link Response}. */ - Response listSecretsWithResponse( + Response deleteWithResponse( String resourceGroupName, String environmentName, String componentName, Context context); /** - * List secrets for a dapr component. + * 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. @@ -126,68 +142,36 @@ Response listSecretsWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. */ - DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); - - /** - * Get a dapr component. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - DaprComponent getById(String id); + void delete(String resourceGroupName, String environmentName, String componentName); /** - * Get a dapr component. + * List secrets for a dapr component. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * 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. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ - void deleteById(String id); + Response listSecretsWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context); /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. + * List secrets for a dapr component. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprComponent resource. - * - * @param name resource name. - * @return the first stage of the new DaprComponent definition. + * @return dapr component Secrets Collection for ListSecrets Action. */ - DaprComponent.DefinitionStages.Blank define(String name); + DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java new file mode 100644 index 0000000000000..f0b9ce6544bef --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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; + +/** Configuration properties Dapr component. */ +@Immutable +public final class DaprConfiguration { + /* + * The version of Dapr + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** Creates an instance of DaprConfiguration class. */ + public DaprConfiguration() { + } + + /** + * Get the version property: The version of Dapr. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java new file mode 100644 index 0000000000000..54d093bca047c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Dapr component Secret for ListSecrets Action. */ +@Immutable +public final class DaprSecret { + /* + * Secret Name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Secret Value. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** Creates an instance of DaprSecret class. */ + public DaprSecret() { + } + + /** + * Get the name property: Secret Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: Secret Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java index 3855936a9a9d7..de12dbb024343 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java @@ -14,7 +14,7 @@ public interface DaprSecretsCollection { * * @return the value value. */ - List value(); + List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner object. 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 aa7e68f3d523f..b7b9a41cdc280 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 @@ -43,6 +43,15 @@ public final class EnvironmentProvisioningState extends ExpandableStringEnum ipSecurityRestrictions; + /* + * Sticky Sessions for Single Revision Mode + */ + @JsonProperty(value = "stickySessions") + private IngressStickySessions stickySessions; + + /* + * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. + * Accept indicates server forwards client certificate but does not require a client certificate. Require indicates + * server requires a client certificate. + */ + @JsonProperty(value = "clientCertificateMode") + private IngressClientCertificateMode clientCertificateMode; + + /* + * CORS policy for container app + */ + @JsonProperty(value = "corsPolicy") + private CorsPolicy corsPolicy; + /** Creates an instance of Ingress class. */ public Ingress() { } @@ -241,6 +261,70 @@ public Ingress withIpSecurityRestrictions(List ipSecu return this; } + /** + * Get the stickySessions property: Sticky Sessions for Single Revision Mode. + * + * @return the stickySessions value. + */ + public IngressStickySessions stickySessions() { + return this.stickySessions; + } + + /** + * Set the stickySessions property: Sticky Sessions for Single Revision Mode. + * + * @param stickySessions the stickySessions value to set. + * @return the Ingress object itself. + */ + public Ingress withStickySessions(IngressStickySessions stickySessions) { + this.stickySessions = stickySessions; + return this; + } + + /** + * Get the clientCertificateMode property: Client certificate mode for mTLS authentication. Ignore indicates server + * drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require + * a client certificate. Require indicates server requires a client certificate. + * + * @return the clientCertificateMode value. + */ + public IngressClientCertificateMode clientCertificateMode() { + return this.clientCertificateMode; + } + + /** + * Set the clientCertificateMode property: Client certificate mode for mTLS authentication. Ignore indicates server + * drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require + * a client certificate. Require indicates server requires a client certificate. + * + * @param clientCertificateMode the clientCertificateMode value to set. + * @return the Ingress object itself. + */ + public Ingress withClientCertificateMode(IngressClientCertificateMode clientCertificateMode) { + this.clientCertificateMode = clientCertificateMode; + return this; + } + + /** + * Get the corsPolicy property: CORS policy for container app. + * + * @return the corsPolicy value. + */ + public CorsPolicy corsPolicy() { + return this.corsPolicy; + } + + /** + * Set the corsPolicy property: CORS policy for container app. + * + * @param corsPolicy the corsPolicy value to set. + * @return the Ingress object itself. + */ + public Ingress withCorsPolicy(CorsPolicy corsPolicy) { + this.corsPolicy = corsPolicy; + return this; + } + /** * Validates the instance. * @@ -256,5 +340,11 @@ public void validate() { if (ipSecurityRestrictions() != null) { ipSecurityRestrictions().forEach(e -> e.validate()); } + if (stickySessions() != null) { + stickySessions().validate(); + } + if (corsPolicy() != null) { + corsPolicy().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java new file mode 100644 index 0000000000000..a30b69413bb61 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. + * Accept indicates server forwards client certificate but does not require a client certificate. Require indicates + * server requires a client certificate. + */ +public final class IngressClientCertificateMode extends ExpandableStringEnum { + /** Static value ignore for IngressClientCertificateMode. */ + public static final IngressClientCertificateMode IGNORE = fromString("ignore"); + + /** Static value accept for IngressClientCertificateMode. */ + public static final IngressClientCertificateMode ACCEPT = fromString("accept"); + + /** Static value require for IngressClientCertificateMode. */ + public static final IngressClientCertificateMode REQUIRE = fromString("require"); + + /** + * Creates a new instance of IngressClientCertificateMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IngressClientCertificateMode() { + } + + /** + * Creates or finds a IngressClientCertificateMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding IngressClientCertificateMode. + */ + @JsonCreator + public static IngressClientCertificateMode fromString(String name) { + return fromString(name, IngressClientCertificateMode.class); + } + + /** + * Gets known IngressClientCertificateMode values. + * + * @return known IngressClientCertificateMode values. + */ + public static Collection values() { + return values(IngressClientCertificateMode.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java new file mode 100644 index 0000000000000..8c4de6b75dfa1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Sticky Sessions for Single Revision Mode. */ +@Fluent +public final class IngressStickySessions { + /* + * Sticky Session Affinity + */ + @JsonProperty(value = "affinity") + private Affinity affinity; + + /** Creates an instance of IngressStickySessions class. */ + public IngressStickySessions() { + } + + /** + * Get the affinity property: Sticky Session Affinity. + * + * @return the affinity value. + */ + public Affinity affinity() { + return this.affinity; + } + + /** + * Set the affinity property: Sticky Session Affinity. + * + * @param affinity the affinity value to set. + * @return the IngressStickySessions object itself. + */ + public IngressStickySessions withAffinity(Affinity affinity) { + this.affinity = affinity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 23fbbd3f6f4d6..15eab472d3d20 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 @@ -22,6 +22,15 @@ public final class IngressTransportMethod extends ExpandableStringEnum { /** Static value error for LogLevel. */ public static final LogLevel ERROR = fromString("error"); + /** + * Creates a new instance of LogLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogLevel() { + } + /** * Creates or finds a LogLevel from its string representation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java new file mode 100644 index 0000000000000..00bc8882ee3da --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; +import java.util.Map; + +/** An immutable client-side representation of ManagedCertificate. */ +public interface ManagedCertificate { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: Certificate resource specific properties. + * + * @return the properties value. + */ + ManagedCertificateProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner object. + * + * @return the inner object. + */ + ManagedCertificateInner innerModel(); + + /** The entirety of the ManagedCertificate definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + /** The ManagedCertificate definition stages. */ + interface DefinitionStages { + /** The first stage of the ManagedCertificate definition. */ + interface Blank extends WithLocation { + } + /** The stage of the ManagedCertificate definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the ManagedCertificate definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, environmentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @return the next definition stage. + */ + WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + } + /** + * The stage of the ManagedCertificate definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ManagedCertificate create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ManagedCertificate create(Context context); + } + /** The stage of the ManagedCertificate definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the ManagedCertificate definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Certificate resource specific properties. + * + * @param properties Certificate resource specific properties. + * @return the next definition stage. + */ + WithCreate withProperties(ManagedCertificateProperties properties); + } + } + /** + * Begins update for the ManagedCertificate resource. + * + * @return the stage of resource update. + */ + ManagedCertificate.Update update(); + + /** The template for ManagedCertificate update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ManagedCertificate apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ManagedCertificate apply(Context context); + } + /** The ManagedCertificate update stages. */ + interface UpdateStages { + /** The stage of the ManagedCertificate update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. + * + * @param tags Application-specific metadata in the form of key-value pairs. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ManagedCertificate refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ManagedCertificate refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java new file mode 100644 index 0000000000000..5f331c81666df --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.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.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Managed Certificates. */ +@Fluent +public final class ManagedCertificateCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of ManagedCertificateCollection class. */ + public ManagedCertificateCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the ManagedCertificateCollection object itself. + */ + public ManagedCertificateCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model ManagedCertificateCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedCertificateCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java new file mode 100644 index 0000000000000..291c8a1efe6f2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Selected type of domain control validation for managed certificates. */ +public final class ManagedCertificateDomainControlValidation + extends ExpandableStringEnum { + /** Static value CNAME for ManagedCertificateDomainControlValidation. */ + public static final ManagedCertificateDomainControlValidation CNAME = fromString("CNAME"); + + /** Static value HTTP for ManagedCertificateDomainControlValidation. */ + public static final ManagedCertificateDomainControlValidation HTTP = fromString("HTTP"); + + /** Static value TXT for ManagedCertificateDomainControlValidation. */ + public static final ManagedCertificateDomainControlValidation TXT = fromString("TXT"); + + /** + * Creates a new instance of ManagedCertificateDomainControlValidation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedCertificateDomainControlValidation() { + } + + /** + * Creates or finds a ManagedCertificateDomainControlValidation from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedCertificateDomainControlValidation. + */ + @JsonCreator + public static ManagedCertificateDomainControlValidation fromString(String name) { + return fromString(name, ManagedCertificateDomainControlValidation.class); + } + + /** + * Gets known ManagedCertificateDomainControlValidation values. + * + * @return known ManagedCertificateDomainControlValidation values. + */ + public static Collection values() { + return values(ManagedCertificateDomainControlValidation.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java new file mode 100644 index 0000000000000..b13c65047e596 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A managed certificate to update. */ +@Fluent +public final class ManagedCertificatePatch { + /* + * Application-specific metadata in the form of key-value pairs. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of ManagedCertificatePatch class. */ + public ManagedCertificatePatch() { + } + + /** + * Get the tags property: Application-specific metadata in the form of key-value pairs. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Application-specific metadata in the form of key-value pairs. + * + * @param tags the tags value to set. + * @return the ManagedCertificatePatch object itself. + */ + public ManagedCertificatePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java new file mode 100644 index 0000000000000..cafc6a8482430 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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; + +/** Certificate resource specific properties. */ +@Fluent +public final class ManagedCertificateProperties { + /* + * Provisioning state of the certificate. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CertificateProvisioningState provisioningState; + + /* + * Subject name of the certificate. + */ + @JsonProperty(value = "subjectName") + private String subjectName; + + /* + * Any error occurred during the certificate provision. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private String error; + + /* + * Selected type of domain control validation for managed certificates. + */ + @JsonProperty(value = "domainControlValidation") + private ManagedCertificateDomainControlValidation domainControlValidation; + + /* + * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. + */ + @JsonProperty(value = "validationToken", access = JsonProperty.Access.WRITE_ONLY) + private String validationToken; + + /** Creates an instance of ManagedCertificateProperties class. */ + public ManagedCertificateProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the certificate. + * + * @return the provisioningState value. + */ + public CertificateProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Set the subjectName property: Subject name of the certificate. + * + * @param subjectName the subjectName value to set. + * @return the ManagedCertificateProperties object itself. + */ + public ManagedCertificateProperties withSubjectName(String subjectName) { + this.subjectName = subjectName; + return this; + } + + /** + * Get the error property: Any error occurred during the certificate provision. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Get the domainControlValidation property: Selected type of domain control validation for managed certificates. + * + * @return the domainControlValidation value. + */ + public ManagedCertificateDomainControlValidation domainControlValidation() { + return this.domainControlValidation; + } + + /** + * Set the domainControlValidation property: Selected type of domain control validation for managed certificates. + * + * @param domainControlValidation the domainControlValidation value to set. + * @return the ManagedCertificateProperties object itself. + */ + public ManagedCertificateProperties withDomainControlValidation( + ManagedCertificateDomainControlValidation domainControlValidation) { + this.domainControlValidation = domainControlValidation; + return this; + } + + /** + * Get the validationToken property: A TXT token used for DNS TXT domain control validation when issuing this type + * of managed certificates. + * + * @return the validationToken value. + */ + public String validationToken() { + return this.validationToken; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java new file mode 100644 index 0000000000000..b8dddf1b849fe --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.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.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ManagedCertificates. */ +public interface ManagedCertificates { + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context); + + /** + * Get the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate. + */ + ManagedCertificate get(String resourceGroupName, String environmentName, String managedCertificateName); + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String environmentName, String managedCertificateName, Context context); + + /** + * Deletes the specified Managed Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String managedCertificateName); + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Managed Certificates in a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get the specified Managed Certificate. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response}. + */ + ManagedCertificate getById(String id); + + /** + * Get the specified Managed Certificate. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Certificate along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified Managed Certificate. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified Managed Certificate. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ManagedCertificate resource. + * + * @param name resource name. + * @return the first stage of the new ManagedCertificate definition. + */ + ManagedCertificate.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java index 3fb9b640518a3..6d94e4b957964 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 @@ -56,6 +56,13 @@ public interface ManagedEnvironment { */ EnvironmentSkuProperties sku(); + /** + * Gets the kind property: Kind of the Environment. + * + * @return the kind value. + */ + String kind(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -150,6 +157,27 @@ public interface ManagedEnvironment { */ List workloadProfiles(); + /** + * Gets the kedaConfiguration property: The configuration of Keda component. + * + * @return the kedaConfiguration value. + */ + KedaConfiguration kedaConfiguration(); + + /** + * Gets the daprConfiguration property: The configuration of Dapr component. + * + * @return the daprConfiguration value. + */ + DaprConfiguration daprConfiguration(); + + /** + * Gets the quotas property: Quota status for the environment. + * + * @return the quotas value. + */ + ManagedEnvironmentQuota quotas(); + /** * Gets the region of the resource. * @@ -225,13 +253,17 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, + DefinitionStages.WithKind, DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, DefinitionStages.WithZoneRedundant, DefinitionStages.WithCustomDomainConfiguration, - DefinitionStages.WithWorkloadProfiles { + DefinitionStages.WithWorkloadProfiles, + DefinitionStages.WithKedaConfiguration, + DefinitionStages.WithDaprConfiguration, + DefinitionStages.WithQuotas { /** * Executes the create request. * @@ -267,6 +299,16 @@ interface WithSku { */ WithCreate withSku(EnvironmentSkuProperties sku); } + /** The stage of the ManagedEnvironment definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of the Environment.. + * + * @param kind Kind of the Environment. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } /** The stage of the ManagedEnvironment definition allowing to specify daprAIInstrumentationKey. */ interface WithDaprAIInstrumentationKey { /** @@ -343,6 +385,36 @@ interface WithWorkloadProfiles { */ WithCreate withWorkloadProfiles(List workloadProfiles); } + /** The stage of the ManagedEnvironment definition allowing to specify kedaConfiguration. */ + interface WithKedaConfiguration { + /** + * Specifies the kedaConfiguration property: The configuration of Keda component.. + * + * @param kedaConfiguration The configuration of Keda component. + * @return the next definition stage. + */ + WithCreate withKedaConfiguration(KedaConfiguration kedaConfiguration); + } + /** The stage of the ManagedEnvironment definition allowing to specify daprConfiguration. */ + interface WithDaprConfiguration { + /** + * Specifies the daprConfiguration property: The configuration of Dapr component.. + * + * @param daprConfiguration The configuration of Dapr component. + * @return the next definition stage. + */ + WithCreate withDaprConfiguration(DaprConfiguration daprConfiguration); + } + /** The stage of the ManagedEnvironment definition allowing to specify quotas. */ + interface WithQuotas { + /** + * Specifies the quotas property: Quota status for the environment.. + * + * @param quotas Quota status for the environment. + * @return the next definition stage. + */ + WithCreate withQuotas(ManagedEnvironmentQuota quotas); + } } /** * Begins update for the ManagedEnvironment resource. @@ -355,12 +427,16 @@ interface WithWorkloadProfiles { interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, + UpdateStages.WithKind, UpdateStages.WithDaprAIInstrumentationKey, UpdateStages.WithDaprAIConnectionString, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, UpdateStages.WithCustomDomainConfiguration, - UpdateStages.WithWorkloadProfiles { + UpdateStages.WithWorkloadProfiles, + UpdateStages.WithKedaConfiguration, + UpdateStages.WithDaprConfiguration, + UpdateStages.WithQuotas { /** * Executes the update request. * @@ -398,6 +474,16 @@ interface WithSku { */ Update withSku(EnvironmentSkuProperties sku); } + /** The stage of the ManagedEnvironment update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of the Environment.. + * + * @param kind Kind of the Environment. + * @return the next definition stage. + */ + Update withKind(String kind); + } /** The stage of the ManagedEnvironment update allowing to specify daprAIInstrumentationKey. */ interface WithDaprAIInstrumentationKey { /** @@ -464,6 +550,36 @@ interface WithWorkloadProfiles { */ Update withWorkloadProfiles(List workloadProfiles); } + /** The stage of the ManagedEnvironment update allowing to specify kedaConfiguration. */ + interface WithKedaConfiguration { + /** + * Specifies the kedaConfiguration property: The configuration of Keda component.. + * + * @param kedaConfiguration The configuration of Keda component. + * @return the next definition stage. + */ + Update withKedaConfiguration(KedaConfiguration kedaConfiguration); + } + /** The stage of the ManagedEnvironment update allowing to specify daprConfiguration. */ + interface WithDaprConfiguration { + /** + * Specifies the daprConfiguration property: The configuration of Dapr component.. + * + * @param daprConfiguration The configuration of Dapr component. + * @return the next definition stage. + */ + Update withDaprConfiguration(DaprConfiguration daprConfiguration); + } + /** The stage of the ManagedEnvironment update allowing to specify quotas. */ + interface WithQuotas { + /** + * Specifies the quotas property: Quota status for the environment.. + * + * @param quotas Quota status for the environment. + * @return the next definition stage. + */ + Update withQuotas(ManagedEnvironmentQuota quotas); + } } /** * Refreshes the resource to sync with Azure. 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 index dc5d155af7619..bf986a699ddb2 100644 --- 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 @@ -16,6 +16,15 @@ public final class ManagedEnvironmentOutBoundType extends ExpandableStringEnum getByResourceGroupWithResponse( */ void delete(String resourceGroupName, String environmentName, Context context); - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - /** * Get auth token for a managed environment * 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 b06d0fb6ca057..26bdab801b0b7 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 @@ -23,6 +23,15 @@ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value HTTPS for Scheme. */ public static final Scheme HTTPS = fromString("HTTPS"); + /** + * Creates a new instance of Scheme value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Scheme() { + } + /** * Creates or finds a Scheme from its string representation. * 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 index 2f9018c8ebfff..b8a01ea97879b 100644 --- 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 @@ -16,6 +16,15 @@ public final class SkuName extends ExpandableStringEnum { /** Static value Premium for SkuName. */ public static final SkuName PREMIUM = fromString("Premium"); + /** + * Creates a new instance of SkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuName() { + } + /** * Creates or finds a SkuName from its string representation. * 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 e99c063b3a2a0..5c1f3d14d013f 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 @@ -22,6 +22,15 @@ public final class SourceControlOperationState extends ExpandableStringEnum { /** Static value EmptyDir for StorageType. */ public static final StorageType EMPTY_DIR = fromString("EmptyDir"); + /** + * Creates a new instance of StorageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageType() { + } + /** * Creates or finds a StorageType from its string representation. * 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 f6780b693f9b4..d7c75a6a0542b 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 @@ -19,6 +19,15 @@ public final class Type extends ExpandableStringEnum { /** Static value Startup for Type. */ public static final Type STARTUP = fromString("Startup"); + /** + * Creates a new instance of Type value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Type() { + } + /** * Creates or finds a Type from its string representation. * 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 411c85b2c65a0..79ce311093bd4 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 @@ -25,8 +25,8 @@ public final class VnetConfiguration { 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. + * This field is deprecated and not used. If you wish to provide your own subnet that Container App containers are + * injected into, then you should leverage the infrastructureSubnetId. */ @JsonProperty(value = "runtimeSubnetId") private String runtimeSubnetId; @@ -109,9 +109,8 @@ public VnetConfiguration withInfrastructureSubnetId(String infrastructureSubnetI } /** - * Get the runtimeSubnetId property: 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. + * Get the runtimeSubnetId property: This field is deprecated and not used. If you wish to provide your own subnet + * that Container App containers are injected into, then you should leverage the infrastructureSubnetId. * * @return the runtimeSubnetId value. */ @@ -120,9 +119,8 @@ public String runtimeSubnetId() { } /** - * Set the runtimeSubnetId property: 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. + * Set the runtimeSubnetId property: This field is deprecated and not used. If you wish to provide your own subnet + * that Container App containers are injected into, then you should leverage the infrastructureSubnetId. * * @param runtimeSubnetId the runtimeSubnetId value to set. * @return the VnetConfiguration object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java index cb3b124a6d1d6..20243e5d948e0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. @@ -17,6 +15,6 @@ public final class AvailableWorkloadProfilesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.availableWorkloadProfiles().get("East US", Context.NONE); + manager.availableWorkloadProfiles().get("East US", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java index 5a61c09fc5195..fd7115d30c75d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -17,6 +15,6 @@ public final class BillingMetersGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.billingMeters().getWithResponse("East US", Context.NONE); + manager.billingMeters().getWithResponse("East US", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index 01c68c8b82cd7..fda5e3bb44175 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 @@ -4,12 +4,13 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; 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/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -20,13 +21,16 @@ public static void createOrUpdateCertificate( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes())), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java index ba5d9fdaca292..a2d62e150471f 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -19,6 +17,7 @@ public final class CertificatesDeleteSamples { public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .deleteWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java index 8c03998b60ca9..7afdcc55c2790 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -19,6 +17,7 @@ public final class CertificatesGetSamples { public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java index 78d2e8e1bdbb5..19e63d09b955f 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -18,6 +16,6 @@ public final class CertificatesListSamples { */ public static void listCertificatesByManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().list("examplerg", "testcontainerenv", Context.NONE); + manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java index db66bc2a7f9df..7feb0ec28c1c9 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 @@ -4,15 +4,14 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import java.util.HashMap; import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -20,12 +19,14 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager + .certificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java index 0b2dd06451947..a947b6edd2f32 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java @@ -4,14 +4,12 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -22,16 +20,13 @@ 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); + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingConnectedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties() + .withPassword("fakeTokenPlaceholder") + .withValue("PFX-or-PEM-blob".getBytes())) + .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java index 21e25b3fd21cf..b7a5e96558348 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -19,6 +17,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsCertificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .deleteWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java index 7516a6391ae80..b381aaa20863c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -19,6 +17,7 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsCertificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java index 5b8c0e11d2f63..3ec2daac8d1bf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -18,6 +16,8 @@ public final class ConnectedEnvironmentsCertificatesListSamples { */ public static void listCertificatesByConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", Context.NONE); + manager + .connectedEnvironmentsCertificates() + .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java index c2ea3462e4953..b39299b1072d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java @@ -4,15 +4,14 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import com.azure.resourcemanager.appcontainers.models.Certificate; 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -20,14 +19,13 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { * @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); + Certificate resource = + manager + .connectedEnvironmentsCertificates() + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java index eb7a2b950c5b9..17a6b371047a4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -4,13 +4,12 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -27,6 +26,6 @@ public static void certificatesCheckNameAvailability( new CheckNameAvailabilityRequest() .withName("testcertificatename") .withType("Microsoft.App/connectedEnvironments/certificates"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java index 522f5ec60a7e4..d52a7f44e9a68 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -29,7 +29,7 @@ public static void createKubeEnvironments(com.azure.resourcemanager.appcontainer new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificatePassword("fakeTokenPlaceholder")) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java index cd3fa3e3ef56b..b9a22cf21da2e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java @@ -4,8 +4,6 @@ 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; @@ -13,7 +11,7 @@ /** 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -24,24 +22,21 @@ 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); + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .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/ConnectedEnvironmentsDaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java index a69345b86f61d..0abe3cf6854f9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -19,6 +17,6 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java index d390a2855c97e..7ab1c4ef3be0e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -19,6 +17,6 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java index 128602c62d89d..736b94063500f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -17,6 +15,8 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", Context.NONE); + manager + .connectedEnvironmentsDaprComponents() + .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java index a61beb8526707..9e334d4ba988a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -20,6 +18,6 @@ public static void listContainerAppsSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java index e9217065c241c..c5b90ed3bbe5c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. @@ -18,6 +16,6 @@ public final class ConnectedEnvironmentsDeleteSamples { */ public static void deleteConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().delete("examplerg", "examplekenv", Context.NONE); + manager.connectedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.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 index a7d39482efc5c..e322fccc92159 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -18,6 +16,8 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public static void getConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", Context.NONE); + manager + .connectedEnvironments() + .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java index 82cc091edcaa1..f0726cba257bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -18,6 +16,6 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { */ public static void listEnvironmentsByResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().listByResourceGroup("examplerg", Context.NONE); + manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.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 index 30f3f82abc13d..d26c49c1d3cec 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. @@ -18,6 +16,6 @@ public final class ConnectedEnvironmentsListSamples { */ public static void listConnectedEnvironmentsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().list(Context.NONE); + manager.connectedEnvironments().list(com.azure.core.util.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 index 48dd759809e9d..dfe807dcd2867 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -29,7 +29,7 @@ public static void createOrUpdateEnvironmentsStorage( .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java index 3d32e15e66d47..feaaaba169b23 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -18,6 +16,8 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + manager + .connectedEnvironmentsStorages() + .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java index 985b69a863c2b..ed92a1ade45d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -18,6 +16,8 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); + manager + .connectedEnvironmentsStorages() + .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java index 7bc9c5c70084c..7375a18f943ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -18,6 +16,8 @@ public final class ConnectedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); + manager + .connectedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java index 0ab238827263a..3c3d4280aa003 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -18,6 +16,6 @@ public final class ConnectedEnvironmentsUpdateSamples { */ public static void patchManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", Context.NONE); + manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.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 2af3fe3a1f3db..9d49b57556063 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/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -35,7 +35,9 @@ public static void createOrUpdateContainerAppAuthConfig( .withFacebook( new Facebook() .withRegistration( - new AppRegistration().withAppId("123").withAppSecretSettingName("facebook-secret")))) + new AppRegistration() + .withAppId("123") + .withAppSecretSettingName("fakeTokenPlaceholder")))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java index 02b1f78b72172..88fc6c0e70275 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -20,6 +18,6 @@ public static void deleteContainerAppAuthConfig( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsAuthConfigs() - .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index eba01b17982f0..e486a12bc43cc 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -20,6 +18,6 @@ public static void getContainerAppSAuthConfig( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsAuthConfigs() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 5151311e9b5e6..6bb2f3420aca9 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -18,6 +16,8 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { */ public static void listAuthConfigsByContainerApps( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", Context.NONE); + manager + .containerAppsAuthConfigs() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index e60fa035af7a0..b387f44203f75 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -14,10 +15,13 @@ 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.CorsPolicy; 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.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; @@ -35,7 +39,7 @@ /** 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -92,7 +96,17 @@ public static void createOrUpdateContainerApp( .withDescription( "Allowing all IP's within the subnet below to access containerapp") .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy( + new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true))) .withDapr( new Dapr() .withEnabled(true) @@ -154,7 +168,7 @@ public static void createOrUpdateContainerApp( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -214,6 +228,70 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. .create(); } + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update ManagedBy App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateManagedByApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerAppManagedBy") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerAppManagedBy-ab1234") + .withWeight(100))))) + .withTemplate( + new Template() + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerAppManagedBy:v1") + .withName("testcontainerAppManagedBy") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("tcpscalingrule") + .withTcp( + new TcpScaleRule() + .withMetadata(mapOf("concurrentConnections", "50"))))))) + .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 8add349fae66f..9d1b11d976497 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -17,6 +15,6 @@ public final class ContainerAppsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().delete("rg", "testWorkerApp0", Context.NONE); + manager.containerApps().delete("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java index 33994d2b505ae..e04fe4ea3b33f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -21,6 +19,9 @@ public static void getContainerAppSDiagnosticsInfo( manager .containerAppsDiagnostics() .getDetectorWithResponse( - "mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", Context.NONE); + "mikono-workerapp-test-rg", + "mikono-capp-stage1", + "cappcontainerappnetworkIO", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java index e5c4a81564578..2cb9e976e50f6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -20,6 +18,7 @@ public static void getContainerAppSRevision( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsDiagnostics() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .getRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java index e0c052a830ae8..5ebdffab7ee88 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -17,6 +15,8 @@ public final class ContainerAppsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", Context.NONE); + manager + .containerAppsDiagnostics() + .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java index 94801afae7276..2847cbd6efef3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. @@ -20,6 +18,6 @@ public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsDiagnostics() - .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", Context.NONE); + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java index fecef91f927ae..5286f512641d4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -18,6 +16,8 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { */ public static void listContainerAppSRevisions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, Context.NONE); + manager + .containerAppsDiagnostics() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java index d12d281193dcd..46b42e2d7d7e4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -18,6 +16,6 @@ public final class ContainerAppsGetAuthTokenSamples { */ public static void getContainerAppAuthToken( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", Context.NONE); + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.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 cd34f1b253fac..1eb2b548d9234 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -17,6 +15,8 @@ public final class ContainerAppsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE); + manager + .containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java index 5d328c5b2fb4c..afc60e55e8a12 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -18,6 +16,6 @@ public final class ContainerAppsListByResourceGroupSamples { */ public static void listContainerAppsByResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listByResourceGroup("rg", Context.NONE); + manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } 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 9a017f67da977..d70305487a85f 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -19,6 +17,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerApps() - .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", Context.NONE); + .listCustomHostnameAnalysisWithResponse( + "rg", "testcontainerApp0", "my.name.corp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index d885680399817..2e3fbe9995937 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -18,6 +16,6 @@ public final class ContainerAppsListSamples { */ public static void listContainerAppsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().list(Context.NONE); + manager.containerApps().list(com.azure.core.util.Context.NONE); } } 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 9a17fe1e8d4a9..27aa4cf4bb305 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -18,6 +16,6 @@ public final class ContainerAppsListSecretsSamples { */ public static void listContainerAppsSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", Context.NONE); + manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index f61fd0c8c7aec..e334879192ce3 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -21,6 +19,10 @@ public static void getContainerAppSRevisionReplica( manager .containerAppsRevisionReplicas() .getReplicaWithResponse( - "workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", Context.NONE); + "workerapps-rg-xj", + "myapp", + "myapp--0wlqy09", + "myapp--0wlqy09-5d9774cff-5wnd8", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index d8dd9e3f9dd67..bdb3851b56135 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -20,6 +18,6 @@ public static void listContainerAppSReplicas( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisionReplicas() - .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", Context.NONE); + .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index c874ecf8f9dbc..68498f009b7a2 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -20,6 +18,7 @@ public static void activateContainerAppSRevision( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .activateRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index a50104cc55453..ad54527931783 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -20,6 +18,7 @@ public static void deactivateContainerAppSRevision( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .deactivateRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index 40770dc22e01f..b892fc57b1d26 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -20,6 +18,7 @@ public static void getContainerAppSRevision( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + .getRevisionWithResponse( + "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 8b6e6137e0a5b..58d1a0cdf8bb8 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -18,6 +16,8 @@ public final class ContainerAppsRevisionsListRevisionsSamples { */ public static void listContainerAppSRevisions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, Context.NONE); + manager + .containerAppsRevisions() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index 75ec2cca6581a..23dada518735c 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -20,6 +18,7 @@ public static void restartContainerAppSRevision( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsRevisions() - .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", Context.NONE); + .restartRevisionWithResponse( + "rg", "testStaticSite0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index b22cf60e93781..2461d4ac6b9e6 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/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -32,11 +32,11 @@ public static void createOrUpdateContainerAppSourceControl( new RegistryInfo() .withRegistryUrl("xwang971reg.azurecr.io") .withRegistryUsername("xwang971reg") - .withRegistryPassword("")) + .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials( new AzureCredentials() .withClientId("") - .withClientSecret("") + .withClientSecret("fakeTokenPlaceholder") .withTenantId("")) .withContextPath("./") .withImage("image/tag")) 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 243a89a2b5382..61c7ffd028f3d 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -18,6 +16,8 @@ public final class ContainerAppsSourceControlsDeleteSamples { */ public static void deleteContainerAppSourceControl( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + manager + .containerAppsSourceControls() + .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index c8e88ef5d8b36..ffe21a2a4964c 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -20,6 +18,6 @@ public static void getContainerAppSSourceControl( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .containerAppsSourceControls() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index ed84c27a47b48..8c683848f9ddc 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -17,6 +15,8 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", Context.NONE); + manager + .containerAppsSourceControls() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index 7c693a2a1f803..c83d5caa22bbe 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 @@ -4,13 +4,13 @@ package com.azure.resourcemanager.appcontainers.generated; -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.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; @@ -19,6 +19,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; @@ -34,7 +35,7 @@ /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -42,113 +43,112 @@ public final class ContainerAppsUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .update( - "rg", - "testcontainerApp0", - new ContainerAppInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) - .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( + ContainerApp resource = + manager + .containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains( Arrays .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( + 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 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( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) + .withTemplate( + new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( Arrays .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))), - Context.NONE); + 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"))))))) + .apply(); } @SuppressWarnings("unchecked") 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 ca9c24c4c77bf..f54bbfd72586f 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 @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.generated; +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; @@ -11,7 +12,7 @@ /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -22,26 +23,29 @@ public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -52,21 +56,24 @@ 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(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index b7da35a6649a4..28f5c3ce9a1b2 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -17,6 +15,8 @@ public final class DaprComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index 43f1c579ea9d0..0bb32eddcde32 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -18,11 +16,13 @@ public final class DaprComponentsGetSamples { */ public static void getDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -31,6 +31,8 @@ public static void getDaprComponentWithSecretStoreComponent( */ public static void getDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java index 722a171a9c772..54769a039ba4e 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -17,6 +15,6 @@ public final class DaprComponentsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().list("examplerg", "myenvironment", Context.NONE); + manager.daprComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index f301616014cac..446140bc74fa1 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -18,6 +16,8 @@ public final class DaprComponentsListSecretsSamples { */ public static void listContainerAppsSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + manager + .daprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..9695bbd944581 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All 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.ManagedCertificateDomainControlValidation; +import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; + +/** Samples for ManagedCertificates CreateOrUpdate. */ +public final class ManagedCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_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 + .managedCertificates() + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new ManagedCertificateProperties() + .withSubjectName("my-subject-name.company.country.net") + .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java new file mode 100644 index 0000000000000..d36229a0ca29a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for ManagedCertificates Delete. */ +public final class ManagedCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedCertificates() + .deleteWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java new file mode 100644 index 0000000000000..1dc1b1f3123af --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for ManagedCertificates Get. */ +public final class ManagedCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .managedCertificates() + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java new file mode 100644 index 0000000000000..688f546880e47 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for ManagedCertificates List. */ +public final class ManagedCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json + */ + /** + * Sample code: List Managed Certificates by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listManagedCertificatesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedCertificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java new file mode 100644 index 0000000000000..af51107e773c0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedCertificates Update. */ +public final class ManagedCertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ManagedCertificate resource = + manager + .managedCertificates() + .getWithResponse( + "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + @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/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java index 8f468b00f2e56..9b93d65c18404 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -21,6 +19,9 @@ public static void getDiagnosticDataForAManagedEnvironments( manager .managedEnvironmentDiagnostics() .getDetectorWithResponse( - "mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", Context.NONE); + "mikono-workerapp-test-rg", + "mikonokubeenv", + "ManagedEnvAvailabilityMetrics", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java index a85c61336f73d..5c8d96149b4f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -20,6 +18,6 @@ public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", Context.NONE); + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java index 750e5d106db96..383d0fb7be5e1 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 @@ -18,7 +18,7 @@ /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -43,13 +43,13 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration( new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles( Arrays .asList( 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 4166699a9962c..e2d498e9e7b18 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -18,6 +16,6 @@ public final class ManagedEnvironmentsDeleteSamples { */ public static void deleteEnvironmentByName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().delete("examplerg", "examplekenv", Context.NONE); + manager.managedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java index efb4da6fedf3f..301eda03c2397 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -17,6 +15,8 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", Context.NONE); + manager + .managedEnvironmentsDiagnostics() + .getRootWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java index bdf62a7cc8a25..4fab8c0765f14 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -18,6 +16,6 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { */ public static void getManagedEnvironmentAuthToken( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", Context.NONE); + manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", com.azure.core.util.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 de387050cbce0..4610b1cdede4e 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -17,6 +15,8 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", Context.NONE); + manager + .managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index 56733c8475f41..3e769980ac7a5 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -18,6 +16,6 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { */ public static void listEnvironmentsByResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listByResourceGroup("examplerg", Context.NONE); + manager.managedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } 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 fb5a7e7e2aaf9..f4576ae4674d1 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -18,6 +16,6 @@ public final class ManagedEnvironmentsListSamples { */ public static void listEnvironmentsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().list(Context.NONE); + manager.managedEnvironments().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java index 5ae4808ba630f..7dabc8f21bcc6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -18,6 +16,8 @@ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { */ public static void listEnvironmentsBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", Context.NONE); + manager + .managedEnvironments() + .listWorkloadProfileStates("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index 3bef9aeafacd4..82c32d794747c 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/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -29,7 +29,7 @@ public static void createOrUpdateEnvironmentsStorage( .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java index 0425718576728..c7b98e0c5c377 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -18,6 +16,8 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", Context.NONE); + manager + .managedEnvironmentsStorages() + .deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index 923f94843e836..188abd50ff546 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -18,6 +16,8 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", Context.NONE); + manager + .managedEnvironmentsStorages() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 10f08f791fee9..64f07a38bf3e8 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -18,6 +16,8 @@ public final class ManagedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); + manager + .managedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java index 99932fc462a6c..85f95e3215585 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 @@ -4,15 +4,14 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import java.util.HashMap; import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -21,15 +20,12 @@ public final class ManagedEnvironmentsUpdateSamples { */ public static void patchManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .update( - "examplerg", - "testcontainerenv", - new ManagedEnvironmentInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); + ManagedEnvironment resource = + manager + .managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") 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 9fe9d81cd3863..fd0c52949c05c 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -27,11 +26,11 @@ public static void certificatesCheckNameAvailability( new CheckNameAvailabilityRequest() .withName("testcertificatename") .withType("Microsoft.App/managedEnvironments/certificates"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -46,6 +45,6 @@ public static void containerAppsCheckNameAvailability( "examplerg", "testcontainerenv", new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java index 41eb1cd667b74..8a9c358610b3b 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 00234c42c406f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AllowedAudiencesValidationTests { - @Test - public void testDeserialize() { - AllowedAudiencesValidation model = - BinaryData.fromString("{\"allowedAudiences\":[\"m\"]}").toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("m", model.allowedAudiences().get(0)); - } - - @Test - public void testSerialize() { - AllowedAudiencesValidation model = new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("m")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("m", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java deleted file mode 100644 index b9de692babcf2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AllowedPrincipalsTests { - @Test - public void testDeserialize() { - AllowedPrincipals model = - BinaryData - .fromString("{\"groups\":[\"urzafb\",\"jjgpb\",\"oq\"],\"identities\":[\"klj\",\"vbqid\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("urzafb", model.groups().get(0)); - Assertions.assertEquals("klj", model.identities().get(0)); - } - - @Test - public void testSerialize() { - AllowedPrincipals model = - new AllowedPrincipals() - .withGroups(Arrays.asList("urzafb", "jjgpb", "oq")) - .withIdentities(Arrays.asList("klj", "vbqid")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("urzafb", model.groups().get(0)); - Assertions.assertEquals("klj", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java deleted file mode 100644 index c1f989a0beeec..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppRegistrationTests { - @Test - public void testDeserialize() { - AppRegistration model = - BinaryData - .fromString("{\"appId\":\"l\",\"appSecretSettingName\":\"majtjaod\"}") - .toObject(AppRegistration.class); - Assertions.assertEquals("l", model.appId()); - Assertions.assertEquals("majtjaod", model.appSecretSettingName()); - } - - @Test - public void testSerialize() { - AppRegistration model = new AppRegistration().withAppId("l").withAppSecretSettingName("majtjaod"); - model = BinaryData.fromObject(model).toObject(AppRegistration.class); - Assertions.assertEquals("l", model.appId()); - Assertions.assertEquals("majtjaod", model.appSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java deleted file mode 100644 index 02090f7ea3d5c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppleRegistrationTests { - @Test - public void testDeserialize() { - AppleRegistration model = - BinaryData - .fromString("{\"clientId\":\"oqfbowskanyk\",\"clientSecretSettingName\":\"lcuiywgqywgndr\"}") - .toObject(AppleRegistration.class); - Assertions.assertEquals("oqfbowskanyk", model.clientId()); - Assertions.assertEquals("lcuiywgqywgndr", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - AppleRegistration model = - new AppleRegistration().withClientId("oqfbowskanyk").withClientSecretSettingName("lcuiywgqywgndr"); - model = BinaryData.fromObject(model).toObject(AppleRegistration.class); - Assertions.assertEquals("oqfbowskanyk", model.clientId()); - Assertions.assertEquals("lcuiywgqywgndr", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java deleted file mode 100644 index dcba9e0131e5f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppleTests { - @Test - public void testDeserialize() { - Apple model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"gnxkrxdqmidtth\",\"clientSecretSettingName\":\"vqdra\"},\"login\":{\"scopes\":[\"big\"]}}") - .toObject(Apple.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - Assertions.assertEquals("vqdra", model.registration().clientSecretSettingName()); - Assertions.assertEquals("big", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - Apple model = - new Apple() - .withEnabled(true) - .withRegistration( - new AppleRegistration().withClientId("gnxkrxdqmidtth").withClientSecretSettingName("vqdra")) - .withLogin(new LoginScopes().withScopes(Arrays.asList("big"))); - model = BinaryData.fromObject(model).toObject(Apple.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - Assertions.assertEquals("vqdra", model.registration().clientSecretSettingName()); - Assertions.assertEquals("big", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java deleted file mode 100644 index 82fd1a024a198..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class AuthConfigCollectionTests { - @Test - public void testDeserialize() { - AuthConfigCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"xpyb\",\"name\":\"zm\",\"type\":\"hmtzopbsphrup\"},{\"properties\":{},\"id\":\"jhphoyc\",\"name\":\"sx\",\"type\":\"obhdxbmtqioqjze\"},{\"properties\":{},\"id\":\"wnoi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}],\"nextLink\":\"mbpazlobcufpdzn\"}") - .toObject(AuthConfigCollection.class); - } - - @Test - public void testSerialize() { - AuthConfigCollection model = - new AuthConfigCollection() - .withValue(Arrays.asList(new AuthConfigInner(), new AuthConfigInner(), new AuthConfigInner())); - model = BinaryData.fromObject(model).toObject(AuthConfigCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java deleted file mode 100644 index 3f179d491cd60..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthConfigInnerTests { - @Test - public void testDeserialize() { - AuthConfigInner model = - BinaryData - .fromString( - "{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"jnqglhqgnu\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"ywifsqesaag\",\"excludedPaths\":[\"glzlhjxrifkwmrv\",\"tsizntocipaoua\"]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"nygj\",\"fjddeqs\",\"deupewnwrei\"]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"rh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"}") - .toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @Test - public void testSerialize() { - AuthConfigInner model = - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("jnqglhqgnu")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("ywifsqesaag") - .withExcludedPaths(Arrays.asList("glzlhjxrifkwmrv", "tsizntocipaoua"))) - .withIdentityProviders(new IdentityProviders().withCustomOpenIdConnectProviders(mapOf())) - .withLogin( - new Login() - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("nygj", "fjddeqs", "deupewnwrei"))) - .withHttpSettings(new HttpSettings().withRequireHttps(false)); - model = BinaryData.fromObject(model).toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java deleted file mode 100644 index 9417352161d21..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigProperties; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.CustomOpenIdConnectProvider; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import com.azure.resourcemanager.appcontainers.models.Twitter; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthConfigPropertiesTests { - @Test - public void testDeserialize() { - AuthConfigProperties model = - BinaryData - .fromString( - "{\"platform\":{\"enabled\":true,\"runtimeVersion\":\"sjtxukcdmp\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"uanzwuxzdx\",\"excludedPaths\":[\"rlhm\",\"hfpmrqobmtukknr\",\"rtihfxtijbpz\",\"gnwzsymglzufc\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":false,\"graphApiVersion\":\"cbjy\"},\"gitHub\":{\"enabled\":false},\"google\":{\"enabled\":true},\"twitter\":{\"enabled\":true},\"apple\":{\"enabled\":false},\"azureStaticWebApps\":{\"enabled\":false},\"customOpenIdConnectProviders\":{\"y\":{\"enabled\":false}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"b\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"vd\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"tfwvukxgaudc\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"jcny\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"htnapczwlokjyem\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"pjoxzjnch\",\"customProtoHeaderName\":\"jspodmailzyde\"}}}") - .toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @Test - public void testSerialize() { - AuthConfigProperties model = - new AuthConfigProperties() - .withPlatform(new AuthPlatform().withEnabled(true).withRuntimeVersion("sjtxukcdmp")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("uanzwuxzdx") - .withExcludedPaths(Arrays.asList("rlhm", "hfpmrqobmtukknr", "rtihfxtijbpz", "gnwzsymglzufc"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory().withEnabled(false).withIsAutoProvisioned(true)) - .withFacebook(new Facebook().withEnabled(false).withGraphApiVersion("cbjy")) - .withGitHub(new GitHub().withEnabled(false)) - .withGoogle(new Google().withEnabled(true)) - .withTwitter(new Twitter().withEnabled(true)) - .withApple(new Apple().withEnabled(false)) - .withAzureStaticWebApps(new AzureStaticWebApps().withEnabled(false)) - .withCustomOpenIdConnectProviders( - mapOf("y", new CustomOpenIdConnectProvider().withEnabled(false)))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("b")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("vd")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("tfwvukxgaudc")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("jcny"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("htnapczwlokjyem")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("pjoxzjnch") - .withCustomProtoHeaderName("jspodmailzyde"))); - model = BinaryData.fromObject(model).toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 9ce13d083e266..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthPlatformTests { - @Test - public void testDeserialize() { - AuthPlatform model = - BinaryData.fromString("{\"enabled\":true,\"runtimeVersion\":\"yahux\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } - - @Test - public void testSerialize() { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("yahux"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java deleted file mode 100644 index 41758c7528532..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableOperationsTests { - @Test - public void testDeserialize() { - AvailableOperations model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"kambtrnegvmnvuqe\",\"isDataAction\":false,\"display\":{\"provider\":\"pa\",\"resource\":\"jbkkdmflvestmjl\",\"operation\":\"ril\",\"description\":\"apeewchpxlkt\"},\"origin\":\"uziycsl\"},{\"name\":\"ufuztcktyhjtq\",\"isDataAction\":true,\"display\":{\"provider\":\"ulwm\",\"resource\":\"qzz\",\"operation\":\"jvpglydzgk\",\"description\":\"qeevt\"},\"origin\":\"pryu\"},{\"name\":\"wytpzdmovz\",\"isDataAction\":false,\"display\":{\"provider\":\"wzqa\",\"resource\":\"lgzurig\",\"operation\":\"ecxn\",\"description\":\"icokpv\"},\"origin\":\"lqtmldgxob\"},{\"name\":\"rclnpkc\",\"isDataAction\":false,\"display\":{\"provider\":\"iykhy\",\"resource\":\"fvjlboxqvkjlmx\",\"operation\":\"mdy\",\"description\":\"dwdigumb\"},\"origin\":\"aauzzptjazysd\"}],\"nextLink\":\"ezwwv\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("kambtrnegvmnvuqe", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("pa", model.value().get(0).display().provider()); - Assertions.assertEquals("jbkkdmflvestmjl", model.value().get(0).display().resource()); - Assertions.assertEquals("ril", model.value().get(0).display().operation()); - Assertions.assertEquals("apeewchpxlkt", model.value().get(0).display().description()); - Assertions.assertEquals("uziycsl", model.value().get(0).origin()); - Assertions.assertEquals("ezwwv", model.nextLink()); - } - - @Test - public void testSerialize() { - AvailableOperations model = - new AvailableOperations() - .withValue( - Arrays - .asList( - new OperationDetailInner() - .withName("kambtrnegvmnvuqe") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("pa") - .withResource("jbkkdmflvestmjl") - .withOperation("ril") - .withDescription("apeewchpxlkt")) - .withOrigin("uziycsl"), - new OperationDetailInner() - .withName("ufuztcktyhjtq") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("ulwm") - .withResource("qzz") - .withOperation("jvpglydzgk") - .withDescription("qeevt")) - .withOrigin("pryu"), - new OperationDetailInner() - .withName("wytpzdmovz") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("wzqa") - .withResource("lgzurig") - .withOperation("ecxn") - .withDescription("icokpv")) - .withOrigin("lqtmldgxob"), - new OperationDetailInner() - .withName("rclnpkc") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("iykhy") - .withResource("fvjlboxqvkjlmx") - .withOperation("mdy") - .withDescription("dwdigumb")) - .withOrigin("aauzzptjazysd"))) - .withNextLink("ezwwv"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("kambtrnegvmnvuqe", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("pa", model.value().get(0).display().provider()); - Assertions.assertEquals("jbkkdmflvestmjl", model.value().get(0).display().resource()); - Assertions.assertEquals("ril", model.value().get(0).display().operation()); - Assertions.assertEquals("apeewchpxlkt", model.value().get(0).display().description()); - Assertions.assertEquals("uziycsl", model.value().get(0).origin()); - Assertions.assertEquals("ezwwv", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java deleted file mode 100644 index 6da5265f95134..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfileInnerTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfileInner model = - BinaryData - .fromString( - "{\"location\":\"ruzslzoj\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuMemoryOptimized\",\"applicability\":\"Custom\",\"cores\":1500212037,\"memoryGiB\":1889500647,\"displayName\":\"ngfdgugeyzihgrky\"},\"id\":\"zabs\",\"name\":\"mfp\",\"type\":\"hojeevy\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("ruzslzoj", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_MEMORY_OPTIMIZED, model.properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1500212037, model.properties().cores()); - Assertions.assertEquals(1889500647, model.properties().memoryGiB()); - Assertions.assertEquals("ngfdgugeyzihgrky", model.properties().displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfileInner model = - new AvailableWorkloadProfileInner() - .withLocation("ruzslzoj") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withApplicability(Applicability.CUSTOM) - .withCores(1500212037) - .withMemoryGiB(1889500647) - .withDisplayName("ngfdgugeyzihgrky")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("ruzslzoj", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_MEMORY_OPTIMIZED, model.properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1500212037, model.properties().cores()); - Assertions.assertEquals(1889500647, model.properties().memoryGiB()); - Assertions.assertEquals("ngfdgugeyzihgrky", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java deleted file mode 100644 index 1d1c287b08cc2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfilePropertiesTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfileProperties model = - BinaryData - .fromString( - "{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"LocationDefault\",\"cores\":1792442027,\"memoryGiB\":296401749,\"displayName\":\"gomfgbeglq\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.billingMeterCategory()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1792442027, model.cores()); - Assertions.assertEquals(296401749, model.memoryGiB()); - Assertions.assertEquals("gomfgbeglq", model.displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfileProperties model = - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1792442027) - .withMemoryGiB(296401749) - .withDisplayName("gomfgbeglq"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.billingMeterCategory()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1792442027, model.cores()); - Assertions.assertEquals(296401749, model.memoryGiB()); - Assertions.assertEquals("gomfgbeglq", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java deleted file mode 100644 index da7e816f2cf12..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfilesCollectionTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfilesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"psttexoq\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"Custom\",\"cores\":402556977,\"memoryGiB\":130119392,\"displayName\":\"uncuw\"},\"id\":\"spkcdqzh\",\"name\":\"ctddun\",\"type\":\"ndy\"},{\"location\":\"chrqb\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"Custom\",\"cores\":1318617256,\"memoryGiB\":4442645,\"displayName\":\"wboxjumvqqo\"},\"id\":\"hrraiouaubrj\",\"name\":\"loqxfuojrngif\",\"type\":\"rzpasccbiuimzdly\"}],\"nextLink\":\"fqwmkyoquf\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("psttexoq", model.value().get(0).location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_GENERAL_PURPOSE, model.value().get(0).properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(402556977, model.value().get(0).properties().cores()); - Assertions.assertEquals(130119392, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("uncuw", model.value().get(0).properties().displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfilesCollection model = - new AvailableWorkloadProfilesCollection() - .withValue( - Arrays - .asList( - new AvailableWorkloadProfileInner() - .withLocation("psttexoq") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.CUSTOM) - .withCores(402556977) - .withMemoryGiB(130119392) - .withDisplayName("uncuw")), - new AvailableWorkloadProfileInner() - .withLocation("chrqb") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.CUSTOM) - .withCores(1318617256) - .withMemoryGiB(4442645) - .withDisplayName("wboxjumvqqo")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("psttexoq", model.value().get(0).location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_GENERAL_PURPOSE, model.value().get(0).properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(402556977, model.value().get(0).properties().cores()); - Assertions.assertEquals(130119392, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("uncuw", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java deleted file mode 100644 index 052ac47bc556b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"idmhmwf\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuComputeOptimized\",\"applicability\":\"LocationDefault\",\"cores\":411481219,\"memoryGiB\":323271862,\"displayName\":\"ccrrvweyoxoyyu\"},\"id\":\"haim\",\"name\":\"oir\",\"type\":\"qboshbra\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.availableWorkloadProfiles().get("wwgbdv", Context.NONE); - - Assertions.assertEquals("idmhmwf", response.iterator().next().location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, response.iterator().next().properties().billingMeterCategory()); - Assertions - .assertEquals(Applicability.LOCATION_DEFAULT, response.iterator().next().properties().applicability()); - Assertions.assertEquals(411481219, response.iterator().next().properties().cores()); - Assertions.assertEquals(323271862, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals("ccrrvweyoxoyyu", response.iterator().next().properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java deleted file mode 100644 index e0b3f0df78733..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryLoginTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryLogin model = - BinaryData - .fromString("{\"loginParameters\":[\"eju\"],\"disableWWWAuthenticate\":true}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("eju", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryLogin model = - new AzureActiveDirectoryLogin().withLoginParameters(Arrays.asList("eju")).withDisableWwwAuthenticate(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("eju", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java deleted file mode 100644 index 59a59d6c4bc42..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryRegistrationTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryRegistration model = - BinaryData - .fromString( - "{\"openIdIssuer\":\"ddgmb\",\"clientId\":\"ex\",\"clientSecretSettingName\":\"bhtqqrolfpfpsa\",\"clientSecretCertificateThumbprint\":\"bquxigjy\",\"clientSecretCertificateSubjectAlternativeName\":\"zjaoyfhrtxil\",\"clientSecretCertificateIssuer\":\"rkujy\"}") - .toObject(AzureActiveDirectoryRegistration.class); - Assertions.assertEquals("ddgmb", model.openIdIssuer()); - Assertions.assertEquals("ex", model.clientId()); - Assertions.assertEquals("bhtqqrolfpfpsa", model.clientSecretSettingName()); - Assertions.assertEquals("bquxigjy", model.clientSecretCertificateThumbprint()); - Assertions.assertEquals("zjaoyfhrtxil", model.clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("rkujy", model.clientSecretCertificateIssuer()); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryRegistration model = - new AzureActiveDirectoryRegistration() - .withOpenIdIssuer("ddgmb") - .withClientId("ex") - .withClientSecretSettingName("bhtqqrolfpfpsa") - .withClientSecretCertificateThumbprint("bquxigjy") - .withClientSecretCertificateSubjectAlternativeName("zjaoyfhrtxil") - .withClientSecretCertificateIssuer("rkujy"); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryRegistration.class); - Assertions.assertEquals("ddgmb", model.openIdIssuer()); - Assertions.assertEquals("ex", model.clientId()); - Assertions.assertEquals("bhtqqrolfpfpsa", model.clientSecretSettingName()); - Assertions.assertEquals("bquxigjy", model.clientSecretCertificateThumbprint()); - Assertions.assertEquals("zjaoyfhrtxil", model.clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("rkujy", model.clientSecretCertificateIssuer()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java deleted file mode 100644 index 0b1d3c18501ef..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryTests { - @Test - public void testDeserialize() { - AzureActiveDirectory model = - BinaryData - .fromString( - "{\"enabled\":false,\"registration\":{\"openIdIssuer\":\"pdappds\",\"clientId\":\"kvwrwjfeu\",\"clientSecretSettingName\":\"hutje\",\"clientSecretCertificateThumbprint\":\"mrldhu\",\"clientSecretCertificateSubjectAlternativeName\":\"zzd\",\"clientSecretCertificateIssuer\":\"qxhocdgeablgphut\"},\"login\":{\"loginParameters\":[\"vkaozwyiftyhxhur\",\"k\"],\"disableWWWAuthenticate\":false},\"validation\":{\"jwtClaimChecks\":{\"allowedGroups\":[\"iwpwcuk\",\"fkgiawxk\",\"ryplwckbasyypn\"],\"allowedClientApplications\":[\"sgcbac\",\"hejkotynqgou\",\"zndlikwy\",\"kgfg\"]},\"allowedAudiences\":[\"adgakeqsrxybz\",\"qedqytbciqfoufl\",\"mnkzsmod\",\"glougpbk\"],\"defaultAuthorizationPolicy\":{\"allowedApplications\":[\"duqkt\",\"pspwgcuertu\",\"kdosvqw\",\"bmdg\"]}},\"isAutoProvisioned\":true}") - .toObject(AzureActiveDirectory.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pdappds", model.registration().openIdIssuer()); - Assertions.assertEquals("kvwrwjfeu", model.registration().clientId()); - Assertions.assertEquals("hutje", model.registration().clientSecretSettingName()); - Assertions.assertEquals("mrldhu", model.registration().clientSecretCertificateThumbprint()); - Assertions.assertEquals("zzd", model.registration().clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("qxhocdgeablgphut", model.registration().clientSecretCertificateIssuer()); - Assertions.assertEquals("vkaozwyiftyhxhur", model.login().loginParameters().get(0)); - Assertions.assertEquals(false, model.login().disableWwwAuthenticate()); - Assertions.assertEquals("iwpwcuk", model.validation().jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("sgcbac", model.validation().jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("adgakeqsrxybz", model.validation().allowedAudiences().get(0)); - Assertions.assertEquals("duqkt", model.validation().defaultAuthorizationPolicy().allowedApplications().get(0)); - Assertions.assertEquals(true, model.isAutoProvisioned()); - } - - @Test - public void testSerialize() { - AzureActiveDirectory model = - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration( - new AzureActiveDirectoryRegistration() - .withOpenIdIssuer("pdappds") - .withClientId("kvwrwjfeu") - .withClientSecretSettingName("hutje") - .withClientSecretCertificateThumbprint("mrldhu") - .withClientSecretCertificateSubjectAlternativeName("zzd") - .withClientSecretCertificateIssuer("qxhocdgeablgphut")) - .withLogin( - new AzureActiveDirectoryLogin() - .withLoginParameters(Arrays.asList("vkaozwyiftyhxhur", "k")) - .withDisableWwwAuthenticate(false)) - .withValidation( - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("iwpwcuk", "fkgiawxk", "ryplwckbasyypn")) - .withAllowedClientApplications( - Arrays.asList("sgcbac", "hejkotynqgou", "zndlikwy", "kgfg"))) - .withAllowedAudiences(Arrays.asList("adgakeqsrxybz", "qedqytbciqfoufl", "mnkzsmod", "glougpbk")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedApplications(Arrays.asList("duqkt", "pspwgcuertu", "kdosvqw", "bmdg")))) - .withIsAutoProvisioned(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pdappds", model.registration().openIdIssuer()); - Assertions.assertEquals("kvwrwjfeu", model.registration().clientId()); - Assertions.assertEquals("hutje", model.registration().clientSecretSettingName()); - Assertions.assertEquals("mrldhu", model.registration().clientSecretCertificateThumbprint()); - Assertions.assertEquals("zzd", model.registration().clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("qxhocdgeablgphut", model.registration().clientSecretCertificateIssuer()); - Assertions.assertEquals("vkaozwyiftyhxhur", model.login().loginParameters().get(0)); - Assertions.assertEquals(false, model.login().disableWwwAuthenticate()); - Assertions.assertEquals("iwpwcuk", model.validation().jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("sgcbac", model.validation().jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("adgakeqsrxybz", model.validation().allowedAudiences().get(0)); - Assertions.assertEquals("duqkt", model.validation().defaultAuthorizationPolicy().allowedApplications().get(0)); - Assertions.assertEquals(true, model.isAutoProvisioned()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java deleted file mode 100644 index 92d5eb1aa61a5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryValidationTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryValidation model = - BinaryData - .fromString( - "{\"jwtClaimChecks\":{\"allowedGroups\":[\"lyxwjkcprbnwbx\",\"jvtbvpyss\",\"dnrujqguhmuouqfp\",\"wzwbnguitn\"],\"allowedClientApplications\":[\"zga\",\"x\"]},\"allowedAudiences\":[\"zuckyfi\",\"rfidfvzwdz\",\"htymw\",\"sdkf\"],\"defaultAuthorizationPolicy\":{\"allowedPrincipals\":{\"groups\":[\"nteiwaopv\",\"mijcmmxdcufufs\"],\"identities\":[\"mzidnsezcxtb\",\"sgfyccsnew\"]},\"allowedApplications\":[\"z\",\"eiachboosflnr\"]}}") - .toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("zga", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("zuckyfi", model.allowedAudiences().get(0)); - Assertions.assertEquals("nteiwaopv", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("mzidnsezcxtb", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("z", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryValidation model = - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups( - Arrays.asList("lyxwjkcprbnwbx", "jvtbvpyss", "dnrujqguhmuouqfp", "wzwbnguitn")) - .withAllowedClientApplications(Arrays.asList("zga", "x"))) - .withAllowedAudiences(Arrays.asList("zuckyfi", "rfidfvzwdz", "htymw", "sdkf")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("nteiwaopv", "mijcmmxdcufufs")) - .withIdentities(Arrays.asList("mzidnsezcxtb", "sgfyccsnew"))) - .withAllowedApplications(Arrays.asList("z", "eiachboosflnr"))); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("zga", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("zuckyfi", model.allowedAudiences().get(0)); - Assertions.assertEquals("nteiwaopv", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("mzidnsezcxtb", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("z", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index 900228f67613f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStaticWebAppsRegistrationTests { - @Test - public void testDeserialize() { - AzureStaticWebAppsRegistration model = - BinaryData.fromString("{\"clientId\":\"cpecfvmmcoofs\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("cpecfvmmcoofs", model.clientId()); - } - - @Test - public void testSerialize() { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("cpecfvmmcoofs"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("cpecfvmmcoofs", model.clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java deleted file mode 100644 index 3924480b27324..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStaticWebAppsTests { - @Test - public void testDeserialize() { - AzureStaticWebApps model = - BinaryData - .fromString("{\"enabled\":true,\"registration\":{\"clientId\":\"gpphrcgyn\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gpphrcgyn", model.registration().clientId()); - } - - @Test - public void testSerialize() { - AzureStaticWebApps model = - new AzureStaticWebApps() - .withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("gpphrcgyn")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gpphrcgyn", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java deleted file mode 100644 index ca32730bb6730..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BaseContainer; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BaseContainerTests { - @Test - public void testDeserialize() { - BaseContainer model = - BinaryData - .fromString( - "{\"image\":\"wmgxcxrsl\",\"name\":\"utwu\",\"command\":[\"rpkhjwn\",\"yqsluic\",\"dggkzzlvmbmpa\"],\"args\":[\"dfvue\",\"yw\",\"bpfvm\"],\"env\":[{\"name\":\"fouyf\",\"value\":\"akcp\",\"secretRef\":\"yzvqt\"},{\"name\":\"ubex\",\"value\":\"zksmondj\",\"secretRef\":\"uxvypomgkopkwh\"}],\"resources\":{\"cpu\":52.49920535887086,\"memory\":\"qgxy\",\"ephemeralStorage\":\"ocmbqfqvmkcxoza\"},\"volumeMounts\":[{\"volumeName\":\"lxprglyatddckcbc\",\"mountPath\":\"jrjxgciqibrhosx\"},{\"volumeName\":\"qrhzoymibmrqyib\",\"mountPath\":\"wfluszdt\"},{\"volumeName\":\"rkwofyyvoqa\",\"mountPath\":\"iexpbtgiwbwo\"}]}") - .toObject(BaseContainer.class); - Assertions.assertEquals("wmgxcxrsl", model.image()); - Assertions.assertEquals("utwu", model.name()); - Assertions.assertEquals("rpkhjwn", model.command().get(0)); - Assertions.assertEquals("dfvue", model.args().get(0)); - Assertions.assertEquals("fouyf", model.env().get(0).name()); - Assertions.assertEquals("akcp", model.env().get(0).value()); - Assertions.assertEquals("yzvqt", model.env().get(0).secretRef()); - Assertions.assertEquals(52.49920535887086D, model.resources().cpu()); - Assertions.assertEquals("qgxy", model.resources().memory()); - Assertions.assertEquals("lxprglyatddckcbc", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("jrjxgciqibrhosx", model.volumeMounts().get(0).mountPath()); - } - - @Test - public void testSerialize() { - BaseContainer model = - new BaseContainer() - .withImage("wmgxcxrsl") - .withName("utwu") - .withCommand(Arrays.asList("rpkhjwn", "yqsluic", "dggkzzlvmbmpa")) - .withArgs(Arrays.asList("dfvue", "yw", "bpfvm")) - .withEnv( - Arrays - .asList( - new EnvironmentVar().withName("fouyf").withValue("akcp").withSecretRef("yzvqt"), - new EnvironmentVar() - .withName("ubex") - .withValue("zksmondj") - .withSecretRef("uxvypomgkopkwh"))) - .withResources(new ContainerResources().withCpu(52.49920535887086D).withMemory("qgxy")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("lxprglyatddckcbc").withMountPath("jrjxgciqibrhosx"), - new VolumeMount().withVolumeName("qrhzoymibmrqyib").withMountPath("wfluszdt"), - new VolumeMount().withVolumeName("rkwofyyvoqa").withMountPath("iexpbtgiwbwo"))); - model = BinaryData.fromObject(model).toObject(BaseContainer.class); - Assertions.assertEquals("wmgxcxrsl", model.image()); - Assertions.assertEquals("utwu", model.name()); - Assertions.assertEquals("rpkhjwn", model.command().get(0)); - Assertions.assertEquals("dfvue", model.args().get(0)); - Assertions.assertEquals("fouyf", model.env().get(0).name()); - Assertions.assertEquals("akcp", model.env().get(0).value()); - Assertions.assertEquals("yzvqt", model.env().get(0).secretRef()); - Assertions.assertEquals(52.49920535887086D, model.resources().cpu()); - Assertions.assertEquals("qgxy", model.resources().memory()); - Assertions.assertEquals("lxprglyatddckcbc", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("jrjxgciqibrhosx", model.volumeMounts().get(0).mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java deleted file mode 100644 index e7bd249fa4fcf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterCollectionInnerTests { - @Test - public void testDeserialize() { - BillingMeterCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"o\",\"properties\":{\"category\":\"PremiumSkuComputeOptimized\",\"meterType\":\"nlu\",\"displayName\":\"krrfx\"},\"id\":\"ebtijvacvbmqzbqq\",\"name\":\"lajrnwxacevehj\",\"type\":\"uyxoaf\"},{\"location\":\"oqltfae\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"fgvxirpghriypoqe\",\"displayName\":\"lqhykprlpyz\"},\"id\":\"ciqdsme\",\"name\":\"iitdfuxt\",\"type\":\"asiibmiybnnust\"},{\"location\":\"ljhnmgixhcmav\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"dorhcgyyp\",\"displayName\":\"twypundmbxh\"},\"id\":\"cmjkavlgorbmftpm\",\"name\":\"tzfjltf\",\"type\":\"nzcyjtotp\"},{\"location\":\"pvpbdbzqgqqiheds\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"mkyi\",\"displayName\":\"ysi\"},\"id\":\"gqcwdhohsdtmc\",\"name\":\"zsu\",\"type\":\"cohdx\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("o", model.value().get(0).location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.value().get(0).properties().category()); - Assertions.assertEquals("nlu", model.value().get(0).properties().meterType()); - Assertions.assertEquals("krrfx", model.value().get(0).properties().displayName()); - } - - @Test - public void testSerialize() { - BillingMeterCollectionInner model = - new BillingMeterCollectionInner() - .withValue( - Arrays - .asList( - new BillingMeter() - .withLocation("o") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED) - .withMeterType("nlu") - .withDisplayName("krrfx")), - new BillingMeter() - .withLocation("oqltfae") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("fgvxirpghriypoqe") - .withDisplayName("lqhykprlpyz")), - new BillingMeter() - .withLocation("ljhnmgixhcmav") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("dorhcgyyp") - .withDisplayName("twypundmbxh")), - new BillingMeter() - .withLocation("pvpbdbzqgqqiheds") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("mkyi") - .withDisplayName("ysi")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("o", model.value().get(0).location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.value().get(0).properties().category()); - Assertions.assertEquals("nlu", model.value().get(0).properties().meterType()); - Assertions.assertEquals("krrfx", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java deleted file mode 100644 index 1e151c8e438a4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterPropertiesTests { - @Test - public void testDeserialize() { - BillingMeterProperties model = - BinaryData - .fromString( - "{\"category\":\"PremiumSkuGeneralPurpose\",\"meterType\":\"eqocljmygvk\",\"displayName\":\"kjjeokbz\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.category()); - Assertions.assertEquals("eqocljmygvk", model.meterType()); - Assertions.assertEquals("kjjeokbz", model.displayName()); - } - - @Test - public void testSerialize() { - BillingMeterProperties model = - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withMeterType("eqocljmygvk") - .withDisplayName("kjjeokbz"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.category()); - Assertions.assertEquals("eqocljmygvk", model.meterType()); - Assertions.assertEquals("kjjeokbz", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java deleted file mode 100644 index c35f18e825ce9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterTests { - @Test - public void testDeserialize() { - BillingMeter model = - BinaryData - .fromString( - "{\"location\":\"lm\",\"properties\":{\"category\":\"PremiumSkuComputeOptimized\",\"meterType\":\"cvhd\",\"displayName\":\"v\"},\"id\":\"qxeysko\",\"name\":\"qzinkfkbg\",\"type\":\"z\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("lm", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.properties().category()); - Assertions.assertEquals("cvhd", model.properties().meterType()); - Assertions.assertEquals("v", model.properties().displayName()); - } - - @Test - public void testSerialize() { - BillingMeter model = - new BillingMeter() - .withLocation("lm") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED) - .withMeterType("cvhd") - .withDisplayName("v")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("lm", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.properties().category()); - Assertions.assertEquals("cvhd", model.properties().meterType()); - Assertions.assertEquals("v", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java deleted file mode 100644 index 11d95a597703e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CertificatePatchTests { - @Test - public void testDeserialize() { - CertificatePatch model = - BinaryData - .fromString( - "{\"tags\":{\"jc\":\"gkbugrjqct\",\"cuplcplcwkhih\":\"isofieypefojyqd\",\"cjhfgmvecactxmw\":\"hlhzdsqtzbsrgno\",\"ovekqvgqouwi\":\"teyowclu\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("gkbugrjqct", model.tags().get("jc")); - } - - @Test - public void testSerialize() { - CertificatePatch model = - new CertificatePatch() - .withTags( - mapOf( - "jc", - "gkbugrjqct", - "cuplcplcwkhih", - "isofieypefojyqd", - "cjhfgmvecactxmw", - "hlhzdsqtzbsrgno", - "ovekqvgqouwi", - "teyowclu")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("gkbugrjqct", model.tags().get("jc")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 2f76d29ef3eaa..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityRequestTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"mpjw\",\"type\":\"vqikfxcvhrfsphu\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("mpjw", model.name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.type()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityRequest model = - new CheckNameAvailabilityRequest().withName("mpjw").withType("vqikfxcvhrfsphu"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("mpjw", model.name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 5da5bcd5937f2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityResponseInnerTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"kteusqczk\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kteusqczk", model.message()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("kteusqczk"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kteusqczk", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java deleted file mode 100644 index fed359577d5cd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientRegistrationTests { - @Test - public void testDeserialize() { - ClientRegistration model = - BinaryData - .fromString("{\"clientId\":\"ocjjxhvpmouexh\",\"clientSecretSettingName\":\"xibqeojnx\"}") - .toObject(ClientRegistration.class); - Assertions.assertEquals("ocjjxhvpmouexh", model.clientId()); - Assertions.assertEquals("xibqeojnx", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - ClientRegistration model = - new ClientRegistration().withClientId("ocjjxhvpmouexh").withClientSecretSettingName("xibqeojnx"); - model = BinaryData.fromObject(model).toObject(ClientRegistration.class); - Assertions.assertEquals("ocjjxhvpmouexh", model.clientId()); - Assertions.assertEquals("xibqeojnx", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java deleted file mode 100644 index f8f5a94b6854b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -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.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConfigurationTests { - @Test - public void testDeserialize() { - Configuration model = - BinaryData - .fromString( - "{\"secrets\":[{\"name\":\"kn\",\"value\":\"scwsv\"},{\"name\":\"otogtwrupqs\",\"value\":\"nmic\"}],\"activeRevisionsMode\":\"Multiple\",\"ingress\":{\"fqdn\":\"o\",\"external\":false,\"targetPort\":2060505199,\"exposedPort\":1344905503,\"transport\":\"tcp\",\"traffic\":[{\"revisionName\":\"fcnj\",\"weight\":534363981,\"latestRevision\":false,\"label\":\"hbttkphyw\"}],\"customDomains\":[{\"name\":\"jtoqne\",\"bindingType\":\"Disabled\",\"certificateId\":\"lfplp\"},{\"name\":\"oxuscrpabgyepsbj\",\"bindingType\":\"Disabled\",\"certificateId\":\"qugxywpmueefjzwf\"},{\"name\":\"kqujidsuyono\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"aocqxtccmgy\"},{\"name\":\"dxyt\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"yrxvwfudwpznt\"}],\"allowInsecure\":false,\"ipSecurityRestrictions\":[{\"name\":\"lrqjbhckfr\",\"description\":\"rxsbkyvp\",\"ipAddressRange\":\"ca\",\"action\":\"Deny\"}]},\"registries\":[{\"server\":\"zka\",\"username\":\"uwbc\",\"passwordSecretRef\":\"wbme\",\"identity\":\"seyvj\"},{\"server\":\"rts\",\"username\":\"spkdee\",\"passwordSecretRef\":\"ofmxagkvtmelmqkr\",\"identity\":\"hvljuahaquh\"},{\"server\":\"hmdua\",\"username\":\"exq\",\"passwordSecretRef\":\"fadmws\",\"identity\":\"r\"}],\"dapr\":{\"enabled\":false,\"appId\":\"gomz\",\"appProtocol\":\"http\",\"appPort\":491284864,\"httpReadBufferSize\":838222488,\"httpMaxRequestSize\":1787960878,\"logLevel\":\"error\",\"enableApiLogging\":true},\"maxInactiveRevisions\":941784903}") - .toObject(Configuration.class); - Assertions.assertEquals("kn", model.secrets().get(0).name()); - Assertions.assertEquals("scwsv", model.secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, model.activeRevisionsMode()); - Assertions.assertEquals(false, model.ingress().external()); - Assertions.assertEquals(2060505199, model.ingress().targetPort()); - Assertions.assertEquals(1344905503, model.ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.TCP, model.ingress().transport()); - Assertions.assertEquals("fcnj", model.ingress().traffic().get(0).revisionName()); - Assertions.assertEquals(534363981, model.ingress().traffic().get(0).weight()); - Assertions.assertEquals(false, model.ingress().traffic().get(0).latestRevision()); - Assertions.assertEquals("hbttkphyw", model.ingress().traffic().get(0).label()); - Assertions.assertEquals("jtoqne", model.ingress().customDomains().get(0).name()); - Assertions.assertEquals(BindingType.DISABLED, model.ingress().customDomains().get(0).bindingType()); - Assertions.assertEquals("lfplp", model.ingress().customDomains().get(0).certificateId()); - Assertions.assertEquals(false, model.ingress().allowInsecure()); - Assertions.assertEquals("lrqjbhckfr", model.ingress().ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("rxsbkyvp", model.ingress().ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("ca", model.ingress().ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.ingress().ipSecurityRestrictions().get(0).action()); - Assertions.assertEquals("zka", model.registries().get(0).server()); - Assertions.assertEquals("uwbc", model.registries().get(0).username()); - Assertions.assertEquals("wbme", model.registries().get(0).passwordSecretRef()); - Assertions.assertEquals("seyvj", model.registries().get(0).identity()); - Assertions.assertEquals(false, model.dapr().enabled()); - Assertions.assertEquals("gomz", model.dapr().appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.dapr().appProtocol()); - Assertions.assertEquals(491284864, model.dapr().appPort()); - Assertions.assertEquals(838222488, model.dapr().httpReadBufferSize()); - Assertions.assertEquals(1787960878, model.dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.ERROR, model.dapr().logLevel()); - Assertions.assertEquals(true, model.dapr().enableApiLogging()); - Assertions.assertEquals(941784903, model.maxInactiveRevisions()); - } - - @Test - public void testSerialize() { - Configuration model = - new Configuration() - .withSecrets( - Arrays - .asList( - new Secret().withName("kn").withValue("scwsv"), - new Secret().withName("otogtwrupqs").withValue("nmic"))) - .withActiveRevisionsMode(ActiveRevisionsMode.MULTIPLE) - .withIngress( - new Ingress() - .withExternal(false) - .withTargetPort(2060505199) - .withExposedPort(1344905503) - .withTransport(IngressTransportMethod.TCP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("fcnj") - .withWeight(534363981) - .withLatestRevision(false) - .withLabel("hbttkphyw"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("jtoqne") - .withBindingType(BindingType.DISABLED) - .withCertificateId("lfplp"), - new CustomDomain() - .withName("oxuscrpabgyepsbj") - .withBindingType(BindingType.DISABLED) - .withCertificateId("qugxywpmueefjzwf"), - new CustomDomain() - .withName("kqujidsuyono") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("aocqxtccmgy"), - new CustomDomain() - .withName("dxyt") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("yrxvwfudwpznt"))) - .withAllowInsecure(false) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("lrqjbhckfr") - .withDescription("rxsbkyvp") - .withIpAddressRange("ca") - .withAction(Action.DENY)))) - .withRegistries( - Arrays - .asList( - new RegistryCredentials() - .withServer("zka") - .withUsername("uwbc") - .withPasswordSecretRef("wbme") - .withIdentity("seyvj"), - new RegistryCredentials() - .withServer("rts") - .withUsername("spkdee") - .withPasswordSecretRef("ofmxagkvtmelmqkr") - .withIdentity("hvljuahaquh"), - new RegistryCredentials() - .withServer("hmdua") - .withUsername("exq") - .withPasswordSecretRef("fadmws") - .withIdentity("r"))) - .withDapr( - new Dapr() - .withEnabled(false) - .withAppId("gomz") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(491284864) - .withHttpReadBufferSize(838222488) - .withHttpMaxRequestSize(1787960878) - .withLogLevel(LogLevel.ERROR) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(941784903); - model = BinaryData.fromObject(model).toObject(Configuration.class); - Assertions.assertEquals("kn", model.secrets().get(0).name()); - Assertions.assertEquals("scwsv", model.secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, model.activeRevisionsMode()); - Assertions.assertEquals(false, model.ingress().external()); - Assertions.assertEquals(2060505199, model.ingress().targetPort()); - Assertions.assertEquals(1344905503, model.ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.TCP, model.ingress().transport()); - Assertions.assertEquals("fcnj", model.ingress().traffic().get(0).revisionName()); - Assertions.assertEquals(534363981, model.ingress().traffic().get(0).weight()); - Assertions.assertEquals(false, model.ingress().traffic().get(0).latestRevision()); - Assertions.assertEquals("hbttkphyw", model.ingress().traffic().get(0).label()); - Assertions.assertEquals("jtoqne", model.ingress().customDomains().get(0).name()); - Assertions.assertEquals(BindingType.DISABLED, model.ingress().customDomains().get(0).bindingType()); - Assertions.assertEquals("lfplp", model.ingress().customDomains().get(0).certificateId()); - Assertions.assertEquals(false, model.ingress().allowInsecure()); - Assertions.assertEquals("lrqjbhckfr", model.ingress().ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("rxsbkyvp", model.ingress().ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("ca", model.ingress().ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.ingress().ipSecurityRestrictions().get(0).action()); - Assertions.assertEquals("zka", model.registries().get(0).server()); - Assertions.assertEquals("uwbc", model.registries().get(0).username()); - Assertions.assertEquals("wbme", model.registries().get(0).passwordSecretRef()); - Assertions.assertEquals("seyvj", model.registries().get(0).identity()); - Assertions.assertEquals(false, model.dapr().enabled()); - Assertions.assertEquals("gomz", model.dapr().appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.dapr().appProtocol()); - Assertions.assertEquals(491284864, model.dapr().appPort()); - Assertions.assertEquals(838222488, model.dapr().httpReadBufferSize()); - Assertions.assertEquals(1787960878, model.dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.ERROR, model.dapr().logLevel()); - Assertions.assertEquals(true, model.dapr().enableApiLogging()); - Assertions.assertEquals(941784903, model.maxInactiveRevisions()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java deleted file mode 100644 index 511f3f22c6083..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentCollectionTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"rtujwsawddjibab\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InfrastructureSetupComplete\",\"deploymentErrors\":\"tzeexav\",\"defaultDomain\":\"tfgle\",\"staticIp\":\"m\",\"daprAIConnectionString\":\"bwpypqtgsfjacb\"},\"location\":\"hxudbxvodht\",\"tags\":{\"agzrcxfa\":\"rudhzmmesckdl\",\"xwmdboxd\":\"lc\"},\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"},{\"extendedLocation\":{\"name\":\"kqg\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InitializationInProgress\",\"deploymentErrors\":\"broyla\",\"defaultDomain\":\"ulcdisdosf\",\"staticIp\":\"jsvg\",\"daprAIConnectionString\":\"whryvycytdcl\"},\"location\":\"cknfnwmbtmvpd\",\"tags\":{\"efedxihchrphkm\":\"httz\",\"gtgkylkdghr\":\"rjdqnsdfzp\",\"kvbwnhhtqlgeh\":\"euutlwxezwzh\",\"vgcxtx\":\"ppipifhpfeoa\"},\"id\":\"csheafidltugsr\",\"name\":\"smkss\",\"type\":\"h\"},{\"extendedLocation\":{\"name\":\"txfkfweg\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"lucbiqtgdqohm\",\"defaultDomain\":\"sldrizetpwbral\",\"staticIp\":\"ibph\",\"daprAIConnectionString\":\"zmizakakan\"},\"location\":\"dnjzh\",\"tags\":{\"oyxprimr\":\"ylhjlm\",\"eislstvasylwx\":\"opteecj\",\"eoohguufuzboyj\":\"zaum\",\"a\":\"thwtzol\"},\"id\":\"mwmdxmebwjscjpa\",\"name\":\"lxveabfqx\",\"type\":\"mwmqtibx\"}],\"nextLink\":\"jddtvqct\"}") - .toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("hxudbxvodht", model.value().get(0).location()); - Assertions.assertEquals("rudhzmmesckdl", model.value().get(0).tags().get("agzrcxfa")); - Assertions.assertEquals("rtujwsawddjibab", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("m", model.value().get(0).staticIp()); - Assertions.assertEquals("bwpypqtgsfjacb", model.value().get(0).daprAIConnectionString()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentCollection model = - new ConnectedEnvironmentCollection() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentInner() - .withLocation("hxudbxvodht") - .withTags(mapOf("agzrcxfa", "rudhzmmesckdl", "xwmdboxd", "lc")) - .withExtendedLocation( - new ExtendedLocation() - .withName("rtujwsawddjibab") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("m") - .withDaprAIConnectionString("bwpypqtgsfjacb"), - new ConnectedEnvironmentInner() - .withLocation("cknfnwmbtmvpd") - .withTags( - mapOf( - "efedxihchrphkm", - "httz", - "gtgkylkdghr", - "rjdqnsdfzp", - "kvbwnhhtqlgeh", - "euutlwxezwzh", - "vgcxtx", - "ppipifhpfeoa")) - .withExtendedLocation( - new ExtendedLocation() - .withName("kqg") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("jsvg") - .withDaprAIConnectionString("whryvycytdcl"), - new ConnectedEnvironmentInner() - .withLocation("dnjzh") - .withTags( - mapOf( - "oyxprimr", - "ylhjlm", - "eislstvasylwx", - "opteecj", - "eoohguufuzboyj", - "zaum", - "a", - "thwtzol")) - .withExtendedLocation( - new ExtendedLocation() - .withName("txfkfweg") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("ibph") - .withDaprAIConnectionString("zmizakakan"))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("hxudbxvodht", model.value().get(0).location()); - Assertions.assertEquals("rudhzmmesckdl", model.value().get(0).tags().get("agzrcxfa")); - Assertions.assertEquals("rtujwsawddjibab", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("m", model.value().get(0).staticIp()); - Assertions.assertEquals("bwpypqtgsfjacb", model.value().get(0).daprAIConnectionString()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java deleted file mode 100644 index 7c98ab3255959..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentInnerTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentInner model = - BinaryData - .fromString( - "{\"extendedLocation\":{\"name\":\"ijaeukm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"ndzaapmudq\",\"defaultDomain\":\"qwigpibudqwyxe\",\"staticIp\":\"ybpmzznrtffyaq\",\"daprAIConnectionString\":\"mhh\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"qaqhvseufu\",\"dnsSuffix\":\"rxpdlcgqlsi\",\"expirationDate\":\"2021-05-24T18:35:38Z\",\"thumbprint\":\"ddgamquhiosr\",\"subjectName\":\"uivfcdis\"}},\"location\":\"rnxzh\",\"tags\":{\"qvwre\":\"xrxzbujrtr\",\"nzonzl\":\"khgn\",\"jtszcof\":\"piqywnc\",\"k\":\"zehtdhgb\"},\"id\":\"reljeamur\",\"name\":\"zmlovuanash\",\"type\":\"xlpm\"}") - .toObject(ConnectedEnvironmentInner.class); - Assertions.assertEquals("rnxzh", model.location()); - Assertions.assertEquals("xrxzbujrtr", model.tags().get("qvwre")); - Assertions.assertEquals("ijaeukm", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals("ybpmzznrtffyaq", model.staticIp()); - Assertions.assertEquals("mhh", model.daprAIConnectionString()); - Assertions.assertEquals("rxpdlcgqlsi", model.customDomainConfiguration().dnsSuffix()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentInner model = - new ConnectedEnvironmentInner() - .withLocation("rnxzh") - .withTags(mapOf("qvwre", "xrxzbujrtr", "nzonzl", "khgn", "jtszcof", "piqywnc", "k", "zehtdhgb")) - .withExtendedLocation( - new ExtendedLocation().withName("ijaeukm").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("ybpmzznrtffyaq") - .withDaprAIConnectionString("mhh") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("rxpdlcgqlsi")); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentInner.class); - Assertions.assertEquals("rnxzh", model.location()); - Assertions.assertEquals("xrxzbujrtr", model.tags().get("qvwre")); - Assertions.assertEquals("ijaeukm", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals("ybpmzznrtffyaq", model.staticIp()); - Assertions.assertEquals("mhh", model.daprAIConnectionString()); - Assertions.assertEquals("rxpdlcgqlsi", model.customDomainConfiguration().dnsSuffix()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java deleted file mode 100644 index 1dcf7976eed2d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentProperties; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentPropertiesTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"InfrastructureSetupInProgress\",\"deploymentErrors\":\"dk\",\"defaultDomain\":\"vidizozsdb\",\"staticIp\":\"xjmonf\",\"daprAIConnectionString\":\"nwncypuuw\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"v\",\"dnsSuffix\":\"jctzenkei\",\"expirationDate\":\"2021-11-19T10:45:07Z\",\"thumbprint\":\"dasvfl\",\"subjectName\":\"bxcudchx\"}}") - .toObject(ConnectedEnvironmentProperties.class); - Assertions.assertEquals("xjmonf", model.staticIp()); - Assertions.assertEquals("nwncypuuw", model.daprAIConnectionString()); - Assertions.assertEquals("jctzenkei", model.customDomainConfiguration().dnsSuffix()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentProperties model = - new ConnectedEnvironmentProperties() - .withStaticIp("xjmonf") - .withDaprAIConnectionString("nwncypuuw") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("jctzenkei")); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentProperties.class); - Assertions.assertEquals("xjmonf", model.staticIp()); - Assertions.assertEquals("nwncypuuw", model.daprAIConnectionString()); - Assertions.assertEquals("jctzenkei", model.customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 77b5f9f5f58d8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentStoragesCollectionInnerTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"ldforobwj\",\"name\":\"vizbfhfo\",\"type\":\"vacqpbtuodxesz\"},{\"properties\":{},\"id\":\"l\",\"name\":\"wumuaslzk\",\"type\":\"rrwoycqucwyhahn\"},{\"properties\":{},\"id\":\"kywuhpsvfuu\",\"name\":\"utlwexxwla\",\"type\":\"niexzsrzpgepq\"}]}") - .toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentStoragesCollectionInner model = - new ConnectedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java deleted file mode 100644 index 1ae6489b0f96b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"extendedLocation\":{\"name\":\"suckzm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentErrors\":\"xaxmq\",\"defaultDomain\":\"alhhjnhgwydyynfs\",\"staticIp\":\"hgbvqtan\",\"daprAIConnectionString\":\"fdlpukhpyr\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"zjcpeogk\",\"dnsSuffix\":\"mgbro\",\"expirationDate\":\"2021-08-20T12:22:55Z\",\"thumbprint\":\"fhp\",\"subjectName\":\"azjzo\"}},\"location\":\"jxhpdulontacn\",\"tags\":{\"xh\":\"tehtuevrhrljyoog\"},\"id\":\"sd\",\"name\":\"ugwbsreurfqkf\",\"type\":\"arenlvhhtklnvnaf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ConnectedEnvironment response = - manager - .connectedEnvironments() - .define("usqogsfikayia") - .withRegion("chrszi") - .withExistingResourceGroup("ijtk") - .withTags(mapOf("fqyggagflnlgmtr", "uelyetndn")) - .withExtendedLocation( - new ExtendedLocation().withName("arujt").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("bqeqqekewvnqvcd") - .withDaprAIConnectionString("uaucmf") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("itacgxmfcsserx")) - .create(); - - Assertions.assertEquals("jxhpdulontacn", response.location()); - Assertions.assertEquals("tehtuevrhrljyoog", response.tags().get("xh")); - Assertions.assertEquals("suckzm", response.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); - Assertions.assertEquals("hgbvqtan", response.staticIp()); - Assertions.assertEquals("fdlpukhpyr", response.daprAIConnectionString()); - Assertions.assertEquals("mgbro", response.customDomainConfiguration().dnsSuffix()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java deleted file mode 100644 index 352da9aeea5da..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"componentType\":\"rymo\",\"version\":\"zrxklobd\",\"ignoreErrors\":true,\"initTimeout\":\"pmkmlmvevfx\",\"secrets\":[],\"secretStoreComponent\":\"hbzxli\",\"metadata\":[],\"scopes\":[\"dtfgxqbawpcbb\"]},\"id\":\"qcy\",\"name\":\"napqo\",\"type\":\"yuicdhzbdy\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.connectedEnvironmentsDaprComponents().list("vroevytlyo", "rrrouuxvnsa", Context.NONE); - - Assertions.assertEquals("rymo", response.iterator().next().componentType()); - Assertions.assertEquals("zrxklobd", response.iterator().next().version()); - Assertions.assertEquals(true, response.iterator().next().ignoreErrors()); - Assertions.assertEquals("pmkmlmvevfx", response.iterator().next().initTimeout()); - Assertions.assertEquals("hbzxli", response.iterator().next().secretStoreComponent()); - Assertions.assertEquals("dtfgxqbawpcbb", response.iterator().next().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 9d10d4deec7c8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironments().delete("djk", "sysidfvclglxnf", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java deleted file mode 100644 index b4ae858aa596d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"pusxjb\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"ohzjqatucoigeb\",\"defaultDomain\":\"cnwfepbnwgfmxjg\",\"staticIp\":\"bjb\",\"daprAIConnectionString\":\"lfgtdysnaquflqbc\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"amz\",\"dnsSuffix\":\"wdkqzeqy\",\"expirationDate\":\"2021-03-27T03:11:25Z\",\"thumbprint\":\"njxdfzantk\",\"subjectName\":\"eg\"}},\"location\":\"mlbnseq\",\"tags\":{\"m\":\"jvpilguooqja\",\"hrtdtpdelq\":\"itgueiookjbs\",\"vcjkgd\":\"cslmotoebnfxo\",\"vcopex\":\"razftxejwabmdujt\"},\"id\":\"m\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.connectedEnvironments().listByResourceGroup("cbuewmrswnjlxuz", Context.NONE); - - Assertions.assertEquals("mlbnseq", response.iterator().next().location()); - Assertions.assertEquals("jvpilguooqja", response.iterator().next().tags().get("m")); - Assertions.assertEquals("pusxjb", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("bjb", response.iterator().next().staticIp()); - Assertions.assertEquals("lfgtdysnaquflqbc", response.iterator().next().daprAIConnectionString()); - Assertions.assertEquals("wdkqzeqy", response.iterator().next().customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java deleted file mode 100644 index 9b849fecf3486..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"wpnulaiywzejyw\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"ScheduledForDelete\",\"deploymentErrors\":\"pllndnp\",\"defaultDomain\":\"rpqaf\",\"staticIp\":\"ug\",\"daprAIConnectionString\":\"n\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"et\",\"dnsSuffix\":\"ypococtfjgtixr\",\"expirationDate\":\"2021-06-13T22:05:20Z\",\"thumbprint\":\"urmlmuo\",\"subjectName\":\"lbau\"}},\"location\":\"opionszon\",\"tags\":{\"jmyccxlzhcoxov\":\"gajinnixjawrtmj\",\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\"},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.connectedEnvironments().list(Context.NONE); - - Assertions.assertEquals("opionszon", response.iterator().next().location()); - Assertions.assertEquals("gajinnixjawrtmj", response.iterator().next().tags().get("jmyccxlzhcoxov")); - Assertions.assertEquals("wpnulaiywzejyw", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("ug", response.iterator().next().staticIp()); - Assertions.assertEquals("n", response.iterator().next().daprAIConnectionString()); - Assertions.assertEquals("ypococtfjgtixr", response.iterator().next().customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java deleted file mode 100644 index 57d5fded64387..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppCollectionTests { - @Test - public void testDeserialize() { - ContainerAppCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"ybcibvyvdcsit\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"f\",\"environmentId\":\"scjeypv\",\"workloadProfileType\":\"zrkgqhcjrefovg\",\"latestRevisionName\":\"qsl\",\"latestRevisionFqdn\":\"yvxyqjp\",\"customDomainVerificationId\":\"attpngjcrcczsq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"daj\"},\"location\":\"ysou\",\"tags\":{\"yhltrpmopjmcm\":\"canoaeupf\"},\"id\":\"tuo\",\"name\":\"thfuiuaodsfcpkvx\",\"type\":\"dpuozmyz\"},{\"extendedLocation\":{\"name\":\"gf\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Deleting\",\"managedEnvironmentId\":\"twhrdxwzywqsm\",\"environmentId\":\"ureximoryocfs\",\"workloadProfileType\":\"s\",\"latestRevisionName\":\"ddystkiiuxhqy\",\"latestRevisionFqdn\":\"xorrqnb\",\"customDomainVerificationId\":\"czvyifq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"jsllrmv\"},\"location\":\"f\",\"tags\":{\"wiqzbqjvsovmyo\":\"kpnpulexxbczwtr\"},\"id\":\"acspkwl\",\"name\":\"zdobpxjmflbvvnch\",\"type\":\"kcciwwzjuqkhr\"},{\"extendedLocation\":{\"name\":\"iwkuofos\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"InProgress\",\"managedEnvironmentId\":\"xieduugidyjrr\",\"environmentId\":\"y\",\"workloadProfileType\":\"svexcsonpclhoco\",\"latestRevisionName\":\"lkevle\",\"latestRevisionFqdn\":\"zfbuhf\",\"customDomainVerificationId\":\"faxkffeii\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"ez\"},\"location\":\"shxmzsbbzoggigrx\",\"tags\":{\"jnspydp\":\"rvjx\"},\"id\":\"koen\",\"name\":\"ou\",\"type\":\"nvudwtiukb\"}],\"nextLink\":\"ngkpocipazy\"}") - .toObject(ContainerAppCollection.class); - Assertions.assertEquals("ysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ybcibvyvdcsit", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("scjeypv", model.value().get(0).environmentId()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).workloadProfileType()); - } - - @Test - public void testSerialize() { - ContainerAppCollection model = - new ContainerAppCollection() - .withValue( - Arrays - .asList( - new ContainerAppInner() - .withLocation("ysou") - .withTags(mapOf("yhltrpmopjmcm", "canoaeupf")) - .withExtendedLocation( - new ExtendedLocation() - .withName("ybcibvyvdcsit") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("f") - .withEnvironmentId("scjeypv") - .withWorkloadProfileType("zrkgqhcjrefovg"), - new ContainerAppInner() - .withLocation("f") - .withTags(mapOf("wiqzbqjvsovmyo", "kpnpulexxbczwtr")) - .withExtendedLocation( - new ExtendedLocation() - .withName("gf") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("twhrdxwzywqsm") - .withEnvironmentId("ureximoryocfs") - .withWorkloadProfileType("s"), - new ContainerAppInner() - .withLocation("shxmzsbbzoggigrx") - .withTags(mapOf("jnspydp", "rvjx")) - .withExtendedLocation( - new ExtendedLocation() - .withName("iwkuofos") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("xieduugidyjrr") - .withEnvironmentId("y") - .withWorkloadProfileType("svexcsonpclhoco"))); - model = BinaryData.fromObject(model).toObject(ContainerAppCollection.class); - Assertions.assertEquals("ysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ybcibvyvdcsit", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("scjeypv", model.value().get(0).environmentId()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).workloadProfileType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java deleted file mode 100644 index 09fb61485df13..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppInnerTests { - @Test - public void testDeserialize() { - ContainerAppInner model = - BinaryData - .fromString( - "{\"extendedLocation\":{\"name\":\"gukgjnpiucgygevq\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"c\":{}}},\"properties\":{\"provisioningState\":\"Failed\",\"managedEnvironmentId\":\"dpydn\",\"environmentId\":\"hxdeoejz\",\"workloadProfileType\":\"w\",\"latestRevisionName\":\"sjttgzfbish\",\"latestRevisionFqdn\":\"khaj\",\"customDomainVerificationId\":\"yeamdphagalpb\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":1833977837},\"template\":{\"revisionSuffix\":\"shwankixzbinje\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"zoqftiyqzrnkcqvy\",\"lwh\"],\"eventStreamEndpoint\":\"sicohoqqnwvlry\"},\"location\":\"w\",\"tags\":{\"gyxzk\":\"unmmq\"},\"id\":\"noc\",\"name\":\"koklya\",\"type\":\"uconuqszfkbey\"}") - .toObject(ContainerAppInner.class); - Assertions.assertEquals("w", model.location()); - Assertions.assertEquals("unmmq", model.tags().get("gyxzk")); - Assertions.assertEquals("gukgjnpiucgygevq", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dpydn", model.managedEnvironmentId()); - Assertions.assertEquals("hxdeoejz", model.environmentId()); - Assertions.assertEquals("w", model.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(1833977837, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("shwankixzbinje", model.template().revisionSuffix()); - } - - @Test - public void testSerialize() { - ContainerAppInner model = - new ContainerAppInner() - .withLocation("w") - .withTags(mapOf("gyxzk", "unmmq")) - .withExtendedLocation( - new ExtendedLocation().withName("gukgjnpiucgygevq").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("c", new UserAssignedIdentity()))) - .withManagedEnvironmentId("dpydn") - .withEnvironmentId("hxdeoejz") - .withWorkloadProfileType("w") - .withConfiguration( - new Configuration() - .withSecrets(Arrays.asList()) - .withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withRegistries(Arrays.asList()) - .withMaxInactiveRevisions(1833977837)) - .withTemplate( - new Template() - .withRevisionSuffix("shwankixzbinje") - .withInitContainers(Arrays.asList()) - .withContainers(Arrays.asList()) - .withVolumes(Arrays.asList())); - model = BinaryData.fromObject(model).toObject(ContainerAppInner.class); - Assertions.assertEquals("w", model.location()); - Assertions.assertEquals("unmmq", model.tags().get("gyxzk")); - Assertions.assertEquals("gukgjnpiucgygevq", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dpydn", model.managedEnvironmentId()); - Assertions.assertEquals("hxdeoejz", model.environmentId()); - Assertions.assertEquals("w", model.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(1833977837, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("shwankixzbinje", model.template().revisionSuffix()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java deleted file mode 100644 index 7a49f669c8f2c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @Test - public void testDeserialize() { - ContainerAppProbeHttpGetHttpHeadersItem model = - BinaryData - .fromString("{\"name\":\"fcktqumiekke\",\"value\":\"zikhl\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("fcktqumiekke", model.name()); - Assertions.assertEquals("zikhl", model.value()); - } - - @Test - public void testSerialize() { - ContainerAppProbeHttpGetHttpHeadersItem model = - new ContainerAppProbeHttpGetHttpHeadersItem().withName("fcktqumiekke").withValue("zikhl"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("fcktqumiekke", model.name()); - Assertions.assertEquals("zikhl", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java deleted file mode 100644 index e24fca86a780c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeHttpGetTests { - @Test - public void testDeserialize() { - ContainerAppProbeHttpGet model = - BinaryData - .fromString( - "{\"host\":\"jawneaiv\",\"httpHeaders\":[{\"name\":\"zel\",\"value\":\"c\"},{\"name\":\"r\",\"value\":\"lsfeaenwabfatkld\"},{\"name\":\"xbjhwuaanozjosph\",\"value\":\"oulpjrv\"}],\"path\":\"glrvimjwosytxi\",\"port\":1413257471,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("jawneaiv", model.host()); - Assertions.assertEquals("zel", model.httpHeaders().get(0).name()); - Assertions.assertEquals("c", model.httpHeaders().get(0).value()); - Assertions.assertEquals("glrvimjwosytxi", model.path()); - Assertions.assertEquals(1413257471, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @Test - public void testSerialize() { - ContainerAppProbeHttpGet model = - new ContainerAppProbeHttpGet() - .withHost("jawneaiv") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("zel").withValue("c"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("r").withValue("lsfeaenwabfatkld"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("xbjhwuaanozjosph") - .withValue("oulpjrv"))) - .withPath("glrvimjwosytxi") - .withPort(1413257471) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("jawneaiv", model.host()); - Assertions.assertEquals("zel", model.httpHeaders().get(0).name()); - Assertions.assertEquals("c", model.httpHeaders().get(0).value()); - Assertions.assertEquals("glrvimjwosytxi", model.path()); - Assertions.assertEquals(1413257471, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java deleted file mode 100644 index e4903494ed139..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeTcpSocketTests { - @Test - public void testDeserialize() { - ContainerAppProbeTcpSocket model = - BinaryData - .fromString("{\"host\":\"jhdgqggebdunyga\",\"port\":2021053825}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("jhdgqggebdunyga", model.host()); - Assertions.assertEquals(2021053825, model.port()); - } - - @Test - public void testSerialize() { - ContainerAppProbeTcpSocket model = - new ContainerAppProbeTcpSocket().withHost("jhdgqggebdunyga").withPort(2021053825); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("jhdgqggebdunyga", model.host()); - Assertions.assertEquals(2021053825, model.port()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java deleted file mode 100644 index 9ff7131fd14de..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeTests { - @Test - public void testDeserialize() { - ContainerAppProbe model = - BinaryData - .fromString( - "{\"failureThreshold\":1892001157,\"httpGet\":{\"host\":\"rhyrnxxmueed\",\"httpHeaders\":[{\"name\":\"dvstkw\",\"value\":\"qtc\"},{\"name\":\"ealmfmtdaaygdvwv\",\"value\":\"piohgwxrtfu\"},{\"name\":\"xepxgyqagvrvmn\",\"value\":\"k\"}],\"path\":\"ghimdblx\",\"port\":505358997,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":1046627826,\"periodSeconds\":984160598,\"successThreshold\":44093722,\"tcpSocket\":{\"host\":\"mszkkfo\",\"port\":739435613},\"terminationGracePeriodSeconds\":6713909564686368420,\"timeoutSeconds\":520152641,\"type\":\"Readiness\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1892001157, model.failureThreshold()); - Assertions.assertEquals("rhyrnxxmueed", model.httpGet().host()); - Assertions.assertEquals("dvstkw", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qtc", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("ghimdblx", model.httpGet().path()); - Assertions.assertEquals(505358997, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(1046627826, model.initialDelaySeconds()); - Assertions.assertEquals(984160598, model.periodSeconds()); - Assertions.assertEquals(44093722, model.successThreshold()); - Assertions.assertEquals("mszkkfo", model.tcpSocket().host()); - Assertions.assertEquals(739435613, model.tcpSocket().port()); - Assertions.assertEquals(6713909564686368420L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(520152641, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } - - @Test - public void testSerialize() { - ContainerAppProbe model = - new ContainerAppProbe() - .withFailureThreshold(1892001157) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("rhyrnxxmueed") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("dvstkw").withValue("qtc"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("ealmfmtdaaygdvwv") - .withValue("piohgwxrtfu"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("xepxgyqagvrvmn") - .withValue("k"))) - .withPath("ghimdblx") - .withPort(505358997) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(1046627826) - .withPeriodSeconds(984160598) - .withSuccessThreshold(44093722) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("mszkkfo").withPort(739435613)) - .withTerminationGracePeriodSeconds(6713909564686368420L) - .withTimeoutSeconds(520152641) - .withType(Type.READINESS); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1892001157, model.failureThreshold()); - Assertions.assertEquals("rhyrnxxmueed", model.httpGet().host()); - Assertions.assertEquals("dvstkw", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qtc", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("ghimdblx", model.httpGet().path()); - Assertions.assertEquals(505358997, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(1046627826, model.initialDelaySeconds()); - Assertions.assertEquals(984160598, model.periodSeconds()); - Assertions.assertEquals(44093722, model.successThreshold()); - Assertions.assertEquals("mszkkfo", model.tcpSocket().host()); - Assertions.assertEquals(739435613, model.tcpSocket().port()); - Assertions.assertEquals(6713909564686368420L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(520152641, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java deleted file mode 100644 index 5547a7f4e8e69..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppProperties; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -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.LogLevel; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.Volume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppPropertiesTests { - @Test - public void testDeserialize() { - ContainerAppProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"managedEnvironmentId\":\"i\",\"environmentId\":\"hxepcyvahfnlj\",\"workloadProfileType\":\"qxj\",\"latestRevisionName\":\"ujqgidok\",\"latestRevisionFqdn\":\"ljyoxgvcltb\",\"customDomainVerificationId\":\"ncghkje\",\"configuration\":{\"secrets\":[{\"name\":\"ijhtxf\",\"value\":\"xbf\"},{\"name\":\"xnehmpvec\",\"value\":\"odebfqkkrbmpu\"},{\"name\":\"riwflzlfb\",\"value\":\"puz\"}],\"activeRevisionsMode\":\"Single\",\"ingress\":{\"fqdn\":\"nqzahmgkbrpyyd\",\"external\":true,\"targetPort\":1877210635,\"exposedPort\":2043148337,\"transport\":\"http\",\"traffic\":[],\"customDomains\":[],\"allowInsecure\":true,\"ipSecurityRestrictions\":[]},\"registries\":[{\"server\":\"n\",\"username\":\"ynhijggme\",\"passwordSecretRef\":\"siarbutrcvpn\",\"identity\":\"zmhjrunmp\"}],\"dapr\":{\"enabled\":true,\"appId\":\"hrbnlankxmyskpbh\",\"appProtocol\":\"grpc\",\"appPort\":2131694851,\"httpReadBufferSize\":2016648328,\"httpMaxRequestSize\":83692384,\"logLevel\":\"info\",\"enableApiLogging\":false},\"maxInactiveRevisions\":1863766018},\"template\":{\"revisionSuffix\":\"lqidyby\",\"initContainers\":[{\"image\":\"clha\",\"name\":\"dbabp\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"thsu\",\"name\":\"cmnyyazttb\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"dckzywbiexz\",\"name\":\"yueaxibxujwb\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"yoxa\",\"name\":\"dkzjancuxrh\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"iwdjswztsdbpgn\",\"name\":\"txhp\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":262767805,\"maxReplicas\":1638223797,\"rules\":[]},\"volumes\":[{\"name\":\"tcty\",\"storageType\":\"AzureFile\",\"storageName\":\"bbovplwzbhvgyugu\"},{\"name\":\"vmkfssxqu\",\"storageType\":\"AzureFile\",\"storageName\":\"l\"},{\"name\":\"gsxnkjzkdeslpv\",\"storageType\":\"AzureFile\",\"storageName\":\"i\"},{\"name\":\"ghxpkdw\",\"storageType\":\"EmptyDir\",\"storageName\":\"uebbaumnyqup\"}]},\"outboundIpAddresses\":[\"ojnabckhsmtxpsie\",\"tfhvpesapskrdqmh\"],\"eventStreamEndpoint\":\"dhtldwkyz\"}") - .toObject(ContainerAppProperties.class); - Assertions.assertEquals("i", model.managedEnvironmentId()); - Assertions.assertEquals("hxepcyvahfnlj", model.environmentId()); - Assertions.assertEquals("qxj", model.workloadProfileType()); - Assertions.assertEquals("ijhtxf", model.configuration().secrets().get(0).name()); - Assertions.assertEquals("xbf", model.configuration().secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(true, model.configuration().ingress().external()); - Assertions.assertEquals(1877210635, model.configuration().ingress().targetPort()); - Assertions.assertEquals(2043148337, model.configuration().ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.configuration().ingress().transport()); - Assertions.assertEquals(true, model.configuration().ingress().allowInsecure()); - Assertions.assertEquals("n", model.configuration().registries().get(0).server()); - Assertions.assertEquals("ynhijggme", model.configuration().registries().get(0).username()); - Assertions.assertEquals("siarbutrcvpn", model.configuration().registries().get(0).passwordSecretRef()); - Assertions.assertEquals("zmhjrunmp", model.configuration().registries().get(0).identity()); - Assertions.assertEquals(true, model.configuration().dapr().enabled()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.configuration().dapr().appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.configuration().dapr().appProtocol()); - Assertions.assertEquals(2131694851, model.configuration().dapr().appPort()); - Assertions.assertEquals(2016648328, model.configuration().dapr().httpReadBufferSize()); - Assertions.assertEquals(83692384, model.configuration().dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.configuration().dapr().logLevel()); - Assertions.assertEquals(false, model.configuration().dapr().enableApiLogging()); - Assertions.assertEquals(1863766018, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("lqidyby", model.template().revisionSuffix()); - Assertions.assertEquals("clha", model.template().initContainers().get(0).image()); - Assertions.assertEquals("dbabp", model.template().initContainers().get(0).name()); - Assertions.assertEquals("thsu", model.template().containers().get(0).image()); - Assertions.assertEquals("cmnyyazttb", model.template().containers().get(0).name()); - Assertions.assertEquals(262767805, model.template().scale().minReplicas()); - Assertions.assertEquals(1638223797, model.template().scale().maxReplicas()); - Assertions.assertEquals("tcty", model.template().volumes().get(0).name()); - Assertions.assertEquals(StorageType.AZURE_FILE, model.template().volumes().get(0).storageType()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.template().volumes().get(0).storageName()); - } - - @Test - public void testSerialize() { - ContainerAppProperties model = - new ContainerAppProperties() - .withManagedEnvironmentId("i") - .withEnvironmentId("hxepcyvahfnlj") - .withWorkloadProfileType("qxj") - .withConfiguration( - new Configuration() - .withSecrets( - Arrays - .asList( - new Secret().withName("ijhtxf").withValue("xbf"), - new Secret().withName("xnehmpvec").withValue("odebfqkkrbmpu"), - new Secret().withName("riwflzlfb").withValue("puz"))) - .withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(1877210635) - .withExposedPort(2043148337) - .withTransport(IngressTransportMethod.HTTP) - .withTraffic(Arrays.asList()) - .withCustomDomains(Arrays.asList()) - .withAllowInsecure(true) - .withIpSecurityRestrictions(Arrays.asList())) - .withRegistries( - Arrays - .asList( - new RegistryCredentials() - .withServer("n") - .withUsername("ynhijggme") - .withPasswordSecretRef("siarbutrcvpn") - .withIdentity("zmhjrunmp"))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppId("hrbnlankxmyskpbh") - .withAppProtocol(AppProtocol.GRPC) - .withAppPort(2131694851) - .withHttpReadBufferSize(2016648328) - .withHttpMaxRequestSize(83692384) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(false)) - .withMaxInactiveRevisions(1863766018)) - .withTemplate( - new Template() - .withRevisionSuffix("lqidyby") - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("clha") - .withName("dbabp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("thsu") - .withName("cmnyyazttb") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("dckzywbiexz") - .withName("yueaxibxujwb") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("yoxa") - .withName("dkzjancuxrh") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("iwdjswztsdbpgn") - .withName("txhp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()))) - .withScale( - new Scale() - .withMinReplicas(262767805) - .withMaxReplicas(1638223797) - .withRules(Arrays.asList())) - .withVolumes( - Arrays - .asList( - new Volume() - .withName("tcty") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("bbovplwzbhvgyugu"), - new Volume() - .withName("vmkfssxqu") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("l"), - new Volume() - .withName("gsxnkjzkdeslpv") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("i"), - new Volume() - .withName("ghxpkdw") - .withStorageType(StorageType.EMPTY_DIR) - .withStorageName("uebbaumnyqup")))); - model = BinaryData.fromObject(model).toObject(ContainerAppProperties.class); - Assertions.assertEquals("i", model.managedEnvironmentId()); - Assertions.assertEquals("hxepcyvahfnlj", model.environmentId()); - Assertions.assertEquals("qxj", model.workloadProfileType()); - Assertions.assertEquals("ijhtxf", model.configuration().secrets().get(0).name()); - Assertions.assertEquals("xbf", model.configuration().secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(true, model.configuration().ingress().external()); - Assertions.assertEquals(1877210635, model.configuration().ingress().targetPort()); - Assertions.assertEquals(2043148337, model.configuration().ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.configuration().ingress().transport()); - Assertions.assertEquals(true, model.configuration().ingress().allowInsecure()); - Assertions.assertEquals("n", model.configuration().registries().get(0).server()); - Assertions.assertEquals("ynhijggme", model.configuration().registries().get(0).username()); - Assertions.assertEquals("siarbutrcvpn", model.configuration().registries().get(0).passwordSecretRef()); - Assertions.assertEquals("zmhjrunmp", model.configuration().registries().get(0).identity()); - Assertions.assertEquals(true, model.configuration().dapr().enabled()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.configuration().dapr().appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.configuration().dapr().appProtocol()); - Assertions.assertEquals(2131694851, model.configuration().dapr().appPort()); - Assertions.assertEquals(2016648328, model.configuration().dapr().httpReadBufferSize()); - Assertions.assertEquals(83692384, model.configuration().dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.configuration().dapr().logLevel()); - Assertions.assertEquals(false, model.configuration().dapr().enableApiLogging()); - Assertions.assertEquals(1863766018, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("lqidyby", model.template().revisionSuffix()); - Assertions.assertEquals("clha", model.template().initContainers().get(0).image()); - Assertions.assertEquals("dbabp", model.template().initContainers().get(0).name()); - Assertions.assertEquals("thsu", model.template().containers().get(0).image()); - Assertions.assertEquals("cmnyyazttb", model.template().containers().get(0).name()); - Assertions.assertEquals(262767805, model.template().scale().minReplicas()); - Assertions.assertEquals(1638223797, model.template().scale().maxReplicas()); - Assertions.assertEquals("tcty", model.template().volumes().get(0).name()); - Assertions.assertEquals(StorageType.AZURE_FILE, model.template().volumes().get(0).storageType()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.template().volumes().get(0).storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java deleted file mode 100644 index 084242df7a48a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import org.junit.jupiter.api.Test; - -public final class ContainerAppSecretTests { - @Test - public void testDeserialize() { - ContainerAppSecret model = - BinaryData - .fromString("{\"name\":\"deibqip\",\"value\":\"ghvxndzwmkrefa\"}") - .toObject(ContainerAppSecret.class); - } - - @Test - public void testSerialize() { - ContainerAppSecret model = new ContainerAppSecret(); - model = BinaryData.fromObject(model).toObject(ContainerAppSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java deleted file mode 100644 index 11a175e7be13a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"vz\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"RedirectToLoginPage\",\"redirectToProvider\":\"fbzdixzmqpnoda\",\"excludedPaths\":[]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"atutmzlbiojlvfhr\",\"name\":\"bpneqvcwwyyurm\",\"type\":\"chpp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsAuthConfigs().listByContainerApp("fezrx", "czurtlei", Context.NONE); - - Assertions.assertEquals(false, response.iterator().next().platform().enabled()); - Assertions.assertEquals("vz", response.iterator().next().platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - response.iterator().next().globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("fbzdixzmqpnoda", response.iterator().next().globalValidation().redirectToProvider()); - Assertions.assertEquals(false, response.iterator().next().login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals(false, response.iterator().next().httpSettings().requireHttps()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java deleted file mode 100644 index 2a395092867a7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"extendedLocation\":{\"name\":\"kiwbuqnyoph\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Succeeded\",\"managedEnvironmentId\":\"nezzcezelfwyfwlw\",\"environmentId\":\"wetnpsihc\",\"workloadProfileType\":\"fzvaylptr\",\"latestRevisionName\":\"qwztcmwqkc\",\"latestRevisionFqdn\":\"xwaxfewzjkj\",\"customDomainVerificationId\":\"fdeqvhpsyl\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Multiple\",\"registries\":[],\"maxInactiveRevisions\":919245965},\"template\":{\"revisionSuffix\":\"zjrgyww\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"tf\",\"jgicgaao\",\"pttaqutd\",\"wemxswvruunzz\"],\"eventStreamEndpoint\":\"ehkfkimrtixok\"},\"location\":\"qyinl\",\"tags\":{\"hiyxgvelfclduc\":\"pqwhixmonst\"},\"id\":\"birdsvuwcobiegs\",\"name\":\"mninwjizcilng\",\"type\":\"gshejjtbxqmulux\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerApp response = - manager - .containerApps() - .define("fgtayxonsup") - .withRegion("rylniofrzg") - .withExistingResourceGroup("mv") - .withTags(mapOf("tkvnlvxbcuiiznkt", "edm")) - .withExtendedLocation( - new ExtendedLocation().withName("lzqnhcvs").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("xfyqonmpqoxwdo") - .withEnvironmentId("bxiqxeiiqbimht") - .withWorkloadProfileType("winhehfqpo") - .withConfiguration( - new Configuration() - .withSecrets(Arrays.asList()) - .withActiveRevisionsMode(ActiveRevisionsMode.MULTIPLE) - .withRegistries(Arrays.asList()) - .withMaxInactiveRevisions(1610520770)) - .withTemplate( - new Template() - .withRevisionSuffix("zuwfmdur") - .withInitContainers(Arrays.asList()) - .withContainers(Arrays.asList()) - .withVolumes(Arrays.asList())) - .create(); - - Assertions.assertEquals("qyinl", response.location()); - Assertions.assertEquals("pqwhixmonst", response.tags().get("hiyxgvelfclduc")); - Assertions.assertEquals("kiwbuqnyoph", response.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nezzcezelfwyfwlw", response.managedEnvironmentId()); - Assertions.assertEquals("wetnpsihc", response.environmentId()); - Assertions.assertEquals("fzvaylptr", response.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, response.configuration().activeRevisionsMode()); - Assertions.assertEquals(919245965, response.configuration().maxInactiveRevisions()); - Assertions.assertEquals("zjrgyww", response.template().revisionSuffix()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java deleted file mode 100644 index bd21d8edc4a57..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerApps().delete("ljhlnymzotq", "ryuzcbmqqv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index ad2bcd84fa701..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"eq\",\"name\":\"arvlagunbt\",\"description\":\"ebwlnbmhyreeudzq\",\"author\":\"bpdqmjxlyy\",\"category\":\"lgouwtlmjj\",\"supportTopicList\":[],\"analysisTypes\":[],\"type\":\"qtobaxkjeyt\",\"score\":38.508713},\"dataset\":[],\"status\":{\"message\":\"wrus\",\"statusId\":1630715289},\"dataProviderMetadata\":{\"providerName\":\"syrq\",\"propertyBag\":[]}},\"id\":\"qhd\",\"name\":\"nxaulk\",\"type\":\"akdkifmjnnawtqab\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsDiagnostics().listDetectors("tz", "atbhjmznn", Context.NONE); - - Assertions.assertEquals("wrus", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1630715289, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("syrq", response.iterator().next().properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java deleted file mode 100644 index 42bf66cb1ba88..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-23T09:27:28Z\",\"lastActiveTime\":\"2021-02-12T07:54:43Z\",\"fqdn\":\"pxiwf\",\"template\":{\"revisionSuffix\":\"jsa\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":true,\"replicas\":1850415836,\"trafficWeight\":337037006,\"provisioningError\":\"viirhgfgrws\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"zvzbglbyv\",\"name\":\"ctctbrxkjz\",\"type\":\"rgxffmshkw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsDiagnostics().listRevisions("xuckpggqoweyir", "hlisngw", "lqqmpiz", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java deleted file mode 100644 index 7b4533edc0b2b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"f\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"s\",\"environmentId\":\"rioov\",\"workloadProfileType\":\"dsxwaab\",\"latestRevisionName\":\"ifrygzn\",\"latestRevisionFqdn\":\"axri\",\"customDomainVerificationId\":\"zob\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":1673403007},\"template\":{\"revisionSuffix\":\"ieixynllxe\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"hslhca\",\"jutifdwfmvigorqj\",\"ttzhra\",\"lkafhonqjuje\"],\"eventStreamEndpoint\":\"kpzvcpopmxelnwc\"},\"location\":\"yjede\",\"tags\":{\"scazuawxtzxpu\":\"lfmk\",\"s\":\"mwabzxrvxc\"},\"id\":\"sphaivmxyasflvg\",\"name\":\"gzwywak\",\"type\":\"ihknsmjbl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerApps().listByResourceGroup("ptgoeiybbabp", Context.NONE); - - Assertions.assertEquals("yjede", response.iterator().next().location()); - Assertions.assertEquals("lfmk", response.iterator().next().tags().get("scazuawxtzxpu")); - Assertions.assertEquals("f", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("s", response.iterator().next().managedEnvironmentId()); - Assertions.assertEquals("rioov", response.iterator().next().environmentId()); - Assertions.assertEquals("dsxwaab", response.iterator().next().workloadProfileType()); - Assertions - .assertEquals(ActiveRevisionsMode.SINGLE, response.iterator().next().configuration().activeRevisionsMode()); - Assertions.assertEquals(1673403007, response.iterator().next().configuration().maxInactiveRevisions()); - Assertions.assertEquals("ieixynllxe", response.iterator().next().template().revisionSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java deleted file mode 100644 index b5de8d1f9c262..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"snmokayzej\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"InProgress\",\"managedEnvironmentId\":\"jh\",\"environmentId\":\"zv\",\"workloadProfileType\":\"h\",\"latestRevisionName\":\"bnwieholew\",\"latestRevisionFqdn\":\"iuubwefqsf\",\"customDomainVerificationId\":\"aqtferr\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":2076529802},\"template\":{\"revisionSuffix\":\"wogqqnobpudcdab\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"wbzasqbuclj\",\"kyexaoguyaipi\"],\"eventStreamEndpoint\":\"daultxijjumfq\"},\"location\":\"z\",\"tags\":{\"jng\":\"nm\",\"bjwgnyfus\":\"qdqx\",\"fh\":\"zsvtuikzhajqgl\"},\"id\":\"l\",\"name\":\"qryxyn\",\"type\":\"nzrdpsovwxz\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.containerApps().list(Context.NONE); - - Assertions.assertEquals("z", response.iterator().next().location()); - Assertions.assertEquals("nm", response.iterator().next().tags().get("jng")); - Assertions.assertEquals("snmokayzej", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("jh", response.iterator().next().managedEnvironmentId()); - Assertions.assertEquals("zv", response.iterator().next().environmentId()); - Assertions.assertEquals("h", response.iterator().next().workloadProfileType()); - Assertions - .assertEquals(ActiveRevisionsMode.SINGLE, response.iterator().next().configuration().activeRevisionsMode()); - Assertions.assertEquals(2076529802, response.iterator().next().configuration().maxInactiveRevisions()); - Assertions.assertEquals("wogqqnobpudcdab", response.iterator().next().template().revisionSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java deleted file mode 100644 index ddca831f448b6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-03-07T21:38:43Z\",\"lastActiveTime\":\"2021-11-24T18:55:58Z\",\"fqdn\":\"ziqgfuh\",\"template\":{\"revisionSuffix\":\"ruswhv\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":1235050131,\"trafficWeight\":1910463572,\"provisioningError\":\"xjww\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"wmxqhndvnoamlds\",\"name\":\"haohdjhhflzokxc\",\"type\":\"xpelnjetagltsx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsRevisions().listRevisions("xqzv", "ers", "ycucrwnamikzeb", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java deleted file mode 100644 index f06d91975a1dc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"k\",\"branch\":\"qirwrweoox\",\"githubActionConfiguration\":{\"contextPath\":\"xwrsnew\",\"image\":\"zqvbubqm\",\"publishType\":\"hsycxhxzgaz\",\"os\":\"abo\",\"runtimeStack\":\"vmfqhppubo\",\"runtimeVersion\":\"epdfgkmtdherng\"}},\"id\":\"c\",\"name\":\"uahokq\",\"type\":\"obkauxofsh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SourceControl response = - manager - .containerAppsSourceControls() - .define("btozipqwje") - .withExistingContainerApp("neiknpg", "xgjiuqh") - .withRepoUrl("xxgewpk") - .withBranch("qylkmqpzoyhlf") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("cloxo") - .withImage("qinjipnwjf") - .withPublishType("qlafcbahhpzpofoi") - .withOs("w") - .withRuntimeStack("ilkmk") - .withRuntimeVersion("olvdnd")) - .create(); - - Assertions.assertEquals("k", response.repoUrl()); - Assertions.assertEquals("qirwrweoox", response.branch()); - Assertions.assertEquals("xwrsnew", response.githubActionConfiguration().contextPath()); - Assertions.assertEquals("zqvbubqm", response.githubActionConfiguration().image()); - Assertions.assertEquals("hsycxhxzgaz", response.githubActionConfiguration().publishType()); - Assertions.assertEquals("abo", response.githubActionConfiguration().os()); - Assertions.assertEquals("vmfqhppubo", response.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("epdfgkmtdherng", response.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 210da113c01d1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsSourceControls().delete("vtxnjmxmcuqud", "cvclxynpdk", "gfabuiyjibuzphdu", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java deleted file mode 100644 index 485e870c2ee3b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"zszuwiwtglxx\",\"branch\":\"jfpgpicrmn\",\"githubActionConfiguration\":{\"contextPath\":\"qgjsxvpqcbfrmbod\",\"image\":\"s\",\"publishType\":\"gvriibakclac\",\"os\":\"rnxousxauzlwvsg\",\"runtimeStack\":\"ohqfzizv\",\"runtimeVersion\":\"mmkjsvthnwpztek\"}},\"id\":\"mribiat\",\"name\":\"gplucfotangcfhny\",\"type\":\"zcugswvxwlmzqw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .containerAppsSourceControls() - .listByContainerApp("zdfuydzvkfvxcnqm", "qpswokmvkhlggdhb", Context.NONE); - - Assertions.assertEquals("zszuwiwtglxx", response.iterator().next().repoUrl()); - Assertions.assertEquals("jfpgpicrmn", response.iterator().next().branch()); - Assertions - .assertEquals("qgjsxvpqcbfrmbod", response.iterator().next().githubActionConfiguration().contextPath()); - Assertions.assertEquals("s", response.iterator().next().githubActionConfiguration().image()); - Assertions.assertEquals("gvriibakclac", response.iterator().next().githubActionConfiguration().publishType()); - Assertions.assertEquals("rnxousxauzlwvsg", response.iterator().next().githubActionConfiguration().os()); - Assertions.assertEquals("ohqfzizv", response.iterator().next().githubActionConfiguration().runtimeStack()); - Assertions - .assertEquals("mmkjsvthnwpztek", response.iterator().next().githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index e885f4068cb83..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerResourcesTests { - @Test - public void testDeserialize() { - ContainerResources model = - BinaryData - .fromString( - "{\"cpu\":4.018076144198646,\"memory\":\"byuqerpqlp\",\"ephemeralStorage\":\"cciuqgbdbutau\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(4.018076144198646D, model.cpu()); - Assertions.assertEquals("byuqerpqlp", model.memory()); - } - - @Test - public void testSerialize() { - ContainerResources model = new ContainerResources().withCpu(4.018076144198646D).withMemory("byuqerpqlp"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(4.018076144198646D, model.cpu()); - Assertions.assertEquals("byuqerpqlp", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java deleted file mode 100644 index 7f5492f8531fa..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -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.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerTests { - @Test - public void testDeserialize() { - Container model = - BinaryData - .fromString( - "{\"probes\":[{\"failureThreshold\":1847154217,\"httpGet\":{\"host\":\"dyh\",\"httpHeaders\":[],\"path\":\"kpw\",\"port\":722591670,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":1405054510,\"periodSeconds\":436930302,\"successThreshold\":217402337,\"tcpSocket\":{\"host\":\"ljxywsu\",\"port\":2009471016},\"terminationGracePeriodSeconds\":6037040030407661019,\"timeoutSeconds\":371488938,\"type\":\"Readiness\"}],\"image\":\"g\",\"name\":\"gvraeaen\",\"command\":[\"zar\"],\"args\":[\"q\",\"uijfqk\",\"cewiipfpub\",\"ibwwiftohqkv\"],\"env\":[{\"name\":\"sgplsakn\",\"value\":\"fsynljphuop\",\"secretRef\":\"dlqiyntorzih\"},{\"name\":\"osjswsr\",\"value\":\"lyzrpzbchckqqzqi\",\"secretRef\":\"iysui\"},{\"name\":\"ynkedyatrwyhqmib\",\"value\":\"hwit\",\"secretRef\":\"ypyynpcdpumnzg\"},{\"name\":\"z\",\"value\":\"abikns\",\"secretRef\":\"gj\"}],\"resources\":{\"cpu\":40.86477682375702,\"memory\":\"lwwrl\",\"ephemeralStorage\":\"m\"},\"volumeMounts\":[{\"volumeName\":\"ok\",\"mountPath\":\"llxdyhgs\"},{\"volumeName\":\"cogjltdtbn\",\"mountPath\":\"adoocrkvc\"},{\"volumeName\":\"hnvpamqgxq\",\"mountPath\":\"ezikywggxkal\"},{\"volumeName\":\"tmelw\",\"mountPath\":\"piccjzkzivgv\"}]}") - .toObject(Container.class); - Assertions.assertEquals("g", model.image()); - Assertions.assertEquals("gvraeaen", model.name()); - Assertions.assertEquals("zar", model.command().get(0)); - Assertions.assertEquals("q", model.args().get(0)); - Assertions.assertEquals("sgplsakn", model.env().get(0).name()); - Assertions.assertEquals("fsynljphuop", model.env().get(0).value()); - Assertions.assertEquals("dlqiyntorzih", model.env().get(0).secretRef()); - Assertions.assertEquals(40.86477682375702D, model.resources().cpu()); - Assertions.assertEquals("lwwrl", model.resources().memory()); - Assertions.assertEquals("ok", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("llxdyhgs", model.volumeMounts().get(0).mountPath()); - Assertions.assertEquals(1847154217, model.probes().get(0).failureThreshold()); - Assertions.assertEquals("dyh", model.probes().get(0).httpGet().host()); - Assertions.assertEquals("kpw", model.probes().get(0).httpGet().path()); - Assertions.assertEquals(722591670, model.probes().get(0).httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.probes().get(0).httpGet().scheme()); - Assertions.assertEquals(1405054510, model.probes().get(0).initialDelaySeconds()); - Assertions.assertEquals(436930302, model.probes().get(0).periodSeconds()); - Assertions.assertEquals(217402337, model.probes().get(0).successThreshold()); - Assertions.assertEquals("ljxywsu", model.probes().get(0).tcpSocket().host()); - Assertions.assertEquals(2009471016, model.probes().get(0).tcpSocket().port()); - Assertions.assertEquals(6037040030407661019L, model.probes().get(0).terminationGracePeriodSeconds()); - Assertions.assertEquals(371488938, model.probes().get(0).timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.probes().get(0).type()); - } - - @Test - public void testSerialize() { - Container model = - new Container() - .withImage("g") - .withName("gvraeaen") - .withCommand(Arrays.asList("zar")) - .withArgs(Arrays.asList("q", "uijfqk", "cewiipfpub", "ibwwiftohqkv")) - .withEnv( - Arrays - .asList( - new EnvironmentVar() - .withName("sgplsakn") - .withValue("fsynljphuop") - .withSecretRef("dlqiyntorzih"), - new EnvironmentVar() - .withName("osjswsr") - .withValue("lyzrpzbchckqqzqi") - .withSecretRef("iysui"), - new EnvironmentVar() - .withName("ynkedyatrwyhqmib") - .withValue("hwit") - .withSecretRef("ypyynpcdpumnzg"), - new EnvironmentVar().withName("z").withValue("abikns").withSecretRef("gj"))) - .withResources(new ContainerResources().withCpu(40.86477682375702D).withMemory("lwwrl")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("ok").withMountPath("llxdyhgs"), - new VolumeMount().withVolumeName("cogjltdtbn").withMountPath("adoocrkvc"), - new VolumeMount().withVolumeName("hnvpamqgxq").withMountPath("ezikywggxkal"), - new VolumeMount().withVolumeName("tmelw").withMountPath("piccjzkzivgv"))) - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withFailureThreshold(1847154217) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("dyh") - .withHttpHeaders(Arrays.asList()) - .withPath("kpw") - .withPort(722591670) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(1405054510) - .withPeriodSeconds(436930302) - .withSuccessThreshold(217402337) - .withTcpSocket( - new ContainerAppProbeTcpSocket().withHost("ljxywsu").withPort(2009471016)) - .withTerminationGracePeriodSeconds(6037040030407661019L) - .withTimeoutSeconds(371488938) - .withType(Type.READINESS))); - model = BinaryData.fromObject(model).toObject(Container.class); - Assertions.assertEquals("g", model.image()); - Assertions.assertEquals("gvraeaen", model.name()); - Assertions.assertEquals("zar", model.command().get(0)); - Assertions.assertEquals("q", model.args().get(0)); - Assertions.assertEquals("sgplsakn", model.env().get(0).name()); - Assertions.assertEquals("fsynljphuop", model.env().get(0).value()); - Assertions.assertEquals("dlqiyntorzih", model.env().get(0).secretRef()); - Assertions.assertEquals(40.86477682375702D, model.resources().cpu()); - Assertions.assertEquals("lwwrl", model.resources().memory()); - Assertions.assertEquals("ok", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("llxdyhgs", model.volumeMounts().get(0).mountPath()); - Assertions.assertEquals(1847154217, model.probes().get(0).failureThreshold()); - Assertions.assertEquals("dyh", model.probes().get(0).httpGet().host()); - Assertions.assertEquals("kpw", model.probes().get(0).httpGet().path()); - Assertions.assertEquals(722591670, model.probes().get(0).httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.probes().get(0).httpGet().scheme()); - Assertions.assertEquals(1405054510, model.probes().get(0).initialDelaySeconds()); - Assertions.assertEquals(436930302, model.probes().get(0).periodSeconds()); - Assertions.assertEquals(217402337, model.probes().get(0).successThreshold()); - Assertions.assertEquals("ljxywsu", model.probes().get(0).tcpSocket().host()); - Assertions.assertEquals(2009471016, model.probes().get(0).tcpSocket().port()); - Assertions.assertEquals(6037040030407661019L, model.probes().get(0).terminationGracePeriodSeconds()); - Assertions.assertEquals(371488938, model.probes().get(0).timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.probes().get(0).type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java deleted file mode 100644 index b40309ff25bf9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CookieExpirationTests { - @Test - public void testDeserialize() { - CookieExpiration model = - BinaryData - .fromString("{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"cftadeh\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("cftadeh", model.timeToExpiration()); - } - - @Test - public void testSerialize() { - CookieExpiration model = - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("cftadeh"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("cftadeh", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java deleted file mode 100644 index 83c04a1b68717..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainConfigurationTests { - @Test - public void testDeserialize() { - CustomDomainConfiguration model = - BinaryData - .fromString( - "{\"customDomainVerificationId\":\"lbfu\",\"dnsSuffix\":\"lyjt\",\"expirationDate\":\"2021-08-04T14:40:51Z\",\"thumbprint\":\"hvfcibyfmow\",\"subjectName\":\"rkjpvdwxfzwii\"}") - .toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("lyjt", model.dnsSuffix()); - } - - @Test - public void testSerialize() { - CustomDomainConfiguration model = new CustomDomainConfiguration().withDnsSuffix("lyjt"); - model = BinaryData.fromObject(model).toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("lyjt", model.dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java deleted file mode 100644 index 7022182d6ee2a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainTests { - @Test - public void testDeserialize() { - CustomDomain model = - BinaryData - .fromString( - "{\"name\":\"hfxobbcswsrtj\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"lrbpbewtghfgbl\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("hfxobbcswsrtj", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("lrbpbewtghfgbl", model.certificateId()); - } - - @Test - public void testSerialize() { - CustomDomain model = - new CustomDomain() - .withName("hfxobbcswsrtj") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("lrbpbewtghfgbl"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("hfxobbcswsrtj", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("lrbpbewtghfgbl", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java deleted file mode 100644 index 5fc1539d6a671..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomScaleRuleTests { - @Test - public void testDeserialize() { - CustomScaleRule model = - BinaryData - .fromString( - "{\"type\":\"gsahmkycgrauw\",\"metadata\":{\"vsmzlxwab\":\"taeburuvdm\",\"efkifr\":\"q\"},\"auth\":[{\"secretRef\":\"qujmqlgkf\",\"triggerParameter\":\"ndo\"},{\"secretRef\":\"n\",\"triggerParameter\":\"jcntuj\"},{\"secretRef\":\"c\",\"triggerParameter\":\"df\"},{\"secretRef\":\"waezkojvd\",\"triggerParameter\":\"zfoqouicybxar\"}]}") - .toObject(CustomScaleRule.class); - Assertions.assertEquals("gsahmkycgrauw", model.type()); - Assertions.assertEquals("taeburuvdm", model.metadata().get("vsmzlxwab")); - Assertions.assertEquals("qujmqlgkf", model.auth().get(0).secretRef()); - Assertions.assertEquals("ndo", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - CustomScaleRule model = - new CustomScaleRule() - .withType("gsahmkycgrauw") - .withMetadata(mapOf("vsmzlxwab", "taeburuvdm", "efkifr", "q")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("qujmqlgkf").withTriggerParameter("ndo"), - new ScaleRuleAuth().withSecretRef("n").withTriggerParameter("jcntuj"), - new ScaleRuleAuth().withSecretRef("c").withTriggerParameter("df"), - new ScaleRuleAuth().withSecretRef("waezkojvd").withTriggerParameter("zfoqouicybxar"))); - model = BinaryData.fromObject(model).toObject(CustomScaleRule.class); - Assertions.assertEquals("gsahmkycgrauw", model.type()); - Assertions.assertEquals("taeburuvdm", model.metadata().get("vsmzlxwab")); - Assertions.assertEquals("qujmqlgkf", model.auth().get(0).secretRef()); - Assertions.assertEquals("ndo", model.auth().get(0).triggerParameter()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java deleted file mode 100644 index 983fad9cfb750..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -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; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentInnerTests { - @Test - public void testDeserialize() { - DaprComponentInner model = - BinaryData - .fromString( - "{\"properties\":{\"componentType\":\"nrojlpijnkr\",\"version\":\"rddh\",\"ignoreErrors\":false,\"initTimeout\":\"izzronasxiftozqy\",\"secrets\":[{\"name\":\"wesgogczh\",\"value\":\"nxkrlgnyhmossxkk\"}],\"secretStoreComponent\":\"h\",\"metadata\":[{\"name\":\"xjb\",\"value\":\"qxvcxgfrpdsofb\",\"secretRef\":\"rnsvbuswd\"}],\"scopes\":[\"ybycnunvj\",\"rtkfawnopq\"]},\"id\":\"kyzirtxdyux\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}") - .toObject(DaprComponentInner.class); - Assertions.assertEquals("nrojlpijnkr", model.componentType()); - Assertions.assertEquals("rddh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("izzronasxiftozqy", model.initTimeout()); - Assertions.assertEquals("wesgogczh", model.secrets().get(0).name()); - Assertions.assertEquals("nxkrlgnyhmossxkk", model.secrets().get(0).value()); - Assertions.assertEquals("h", model.secretStoreComponent()); - Assertions.assertEquals("xjb", model.metadata().get(0).name()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.metadata().get(0).value()); - Assertions.assertEquals("rnsvbuswd", model.metadata().get(0).secretRef()); - Assertions.assertEquals("ybycnunvj", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - DaprComponentInner model = - new DaprComponentInner() - .withComponentType("nrojlpijnkr") - .withVersion("rddh") - .withIgnoreErrors(false) - .withInitTimeout("izzronasxiftozqy") - .withSecrets(Arrays.asList(new Secret().withName("wesgogczh").withValue("nxkrlgnyhmossxkk"))) - .withSecretStoreComponent("h") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("xjb").withValue("qxvcxgfrpdsofb").withSecretRef("rnsvbuswd"))) - .withScopes(Arrays.asList("ybycnunvj", "rtkfawnopq")); - model = BinaryData.fromObject(model).toObject(DaprComponentInner.class); - Assertions.assertEquals("nrojlpijnkr", model.componentType()); - Assertions.assertEquals("rddh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("izzronasxiftozqy", model.initTimeout()); - Assertions.assertEquals("wesgogczh", model.secrets().get(0).name()); - Assertions.assertEquals("nxkrlgnyhmossxkk", model.secrets().get(0).value()); - Assertions.assertEquals("h", model.secretStoreComponent()); - Assertions.assertEquals("xjb", model.metadata().get(0).name()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.metadata().get(0).value()); - Assertions.assertEquals("rnsvbuswd", model.metadata().get(0).secretRef()); - Assertions.assertEquals("ybycnunvj", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java deleted file mode 100644 index baea4ceb25bbd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentPropertiesTests { - @Test - public void testDeserialize() { - DaprComponentProperties model = - BinaryData - .fromString( - "{\"componentType\":\"xtqmieoxor\",\"version\":\"ufhyaomtbgh\",\"ignoreErrors\":false,\"initTimeout\":\"rvk\",\"secrets\":[{\"name\":\"jzhpjbibgjmfx\",\"value\":\"vfcluyovwxnbkfe\"},{\"name\":\"xscyhwzdgirujbz\",\"value\":\"mvzzbtdcqvp\"},{\"name\":\"yujviylwdshfssn\",\"value\":\"gy\"},{\"name\":\"rymsgaojfmw\",\"value\":\"otmrfhir\"}],\"secretStoreComponent\":\"ymoxoftpipiwyczu\",\"metadata\":[{\"name\":\"pqjlihhyusps\",\"value\":\"sdvlmfwdgzxulucv\",\"secretRef\":\"mrsreuzvxurisjnh\"}],\"scopes\":[\"xifqjzgxm\",\"hu\"]}") - .toObject(DaprComponentProperties.class); - Assertions.assertEquals("xtqmieoxor", model.componentType()); - Assertions.assertEquals("ufhyaomtbgh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("rvk", model.initTimeout()); - Assertions.assertEquals("jzhpjbibgjmfx", model.secrets().get(0).name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.secrets().get(0).value()); - Assertions.assertEquals("ymoxoftpipiwyczu", model.secretStoreComponent()); - Assertions.assertEquals("pqjlihhyusps", model.metadata().get(0).name()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.metadata().get(0).value()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.metadata().get(0).secretRef()); - Assertions.assertEquals("xifqjzgxm", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - DaprComponentProperties model = - new DaprComponentProperties() - .withComponentType("xtqmieoxor") - .withVersion("ufhyaomtbgh") - .withIgnoreErrors(false) - .withInitTimeout("rvk") - .withSecrets( - Arrays - .asList( - new Secret().withName("jzhpjbibgjmfx").withValue("vfcluyovwxnbkfe"), - new Secret().withName("xscyhwzdgirujbz").withValue("mvzzbtdcqvp"), - new Secret().withName("yujviylwdshfssn").withValue("gy"), - new Secret().withName("rymsgaojfmw").withValue("otmrfhir"))) - .withSecretStoreComponent("ymoxoftpipiwyczu") - .withMetadata( - Arrays - .asList( - new DaprMetadata() - .withName("pqjlihhyusps") - .withValue("sdvlmfwdgzxulucv") - .withSecretRef("mrsreuzvxurisjnh"))) - .withScopes(Arrays.asList("xifqjzgxm", "hu")); - model = BinaryData.fromObject(model).toObject(DaprComponentProperties.class); - Assertions.assertEquals("xtqmieoxor", model.componentType()); - Assertions.assertEquals("ufhyaomtbgh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("rvk", model.initTimeout()); - Assertions.assertEquals("jzhpjbibgjmfx", model.secrets().get(0).name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.secrets().get(0).value()); - Assertions.assertEquals("ymoxoftpipiwyczu", model.secretStoreComponent()); - Assertions.assertEquals("pqjlihhyusps", model.metadata().get(0).name()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.metadata().get(0).value()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.metadata().get(0).secretRef()); - Assertions.assertEquals("xifqjzgxm", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java deleted file mode 100644 index 95372d8cf1fe1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentsCollectionTests { - @Test - public void testDeserialize() { - DaprComponentsCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"txhojujb\",\"version\":\"elmcuvhixbjxyfw\",\"ignoreErrors\":true,\"initTimeout\":\"coolsttpkiwkkb\",\"secrets\":[],\"secretStoreComponent\":\"rywvtylbfpn\",\"metadata\":[],\"scopes\":[]},\"id\":\"oiwiithtywub\",\"name\":\"cbihwqk\",\"type\":\"fdntwjchrdgoih\"},{\"properties\":{\"componentType\":\"wct\",\"version\":\"dzjlu\",\"ignoreErrors\":false,\"initTimeout\":\"lwg\",\"secrets\":[],\"secretStoreComponent\":\"sb\",\"metadata\":[],\"scopes\":[]},\"id\":\"vtgsei\",\"name\":\"qfi\",\"type\":\"fxqknpirgneptt\"}],\"nextLink\":\"msniffc\"}") - .toObject(DaprComponentsCollection.class); - Assertions.assertEquals("txhojujb", model.value().get(0).componentType()); - Assertions.assertEquals("elmcuvhixbjxyfw", model.value().get(0).version()); - Assertions.assertEquals(true, model.value().get(0).ignoreErrors()); - Assertions.assertEquals("coolsttpkiwkkb", model.value().get(0).initTimeout()); - Assertions.assertEquals("rywvtylbfpn", model.value().get(0).secretStoreComponent()); - } - - @Test - public void testSerialize() { - DaprComponentsCollection model = - new DaprComponentsCollection() - .withValue( - Arrays - .asList( - new DaprComponentInner() - .withComponentType("txhojujb") - .withVersion("elmcuvhixbjxyfw") - .withIgnoreErrors(true) - .withInitTimeout("coolsttpkiwkkb") - .withSecrets(Arrays.asList()) - .withSecretStoreComponent("rywvtylbfpn") - .withMetadata(Arrays.asList()) - .withScopes(Arrays.asList()), - new DaprComponentInner() - .withComponentType("wct") - .withVersion("dzjlu") - .withIgnoreErrors(false) - .withInitTimeout("lwg") - .withSecrets(Arrays.asList()) - .withSecretStoreComponent("sb") - .withMetadata(Arrays.asList()) - .withScopes(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DaprComponentsCollection.class); - Assertions.assertEquals("txhojujb", model.value().get(0).componentType()); - Assertions.assertEquals("elmcuvhixbjxyfw", model.value().get(0).version()); - Assertions.assertEquals(true, model.value().get(0).ignoreErrors()); - Assertions.assertEquals("coolsttpkiwkkb", model.value().get(0).initTimeout()); - Assertions.assertEquals("rywvtylbfpn", model.value().get(0).secretStoreComponent()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java deleted file mode 100644 index 9c6865d077de9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"componentType\":\"ccsrmozihmipgaw\",\"version\":\"xp\",\"ignoreErrors\":true,\"initTimeout\":\"xcjxgrytfmpcy\",\"secrets\":[],\"secretStoreComponent\":\"mcayk\",\"metadata\":[],\"scopes\":[\"uztrksxwpndfcpf\"]},\"id\":\"nthjtwkjaosrxuzv\",\"name\":\"amktcqiosmgbzah\",\"type\":\"xqdlyrtltlapr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.daprComponents().list("atftgzpnpbsw", "e", Context.NONE); - - Assertions.assertEquals("ccsrmozihmipgaw", response.iterator().next().componentType()); - Assertions.assertEquals("xp", response.iterator().next().version()); - Assertions.assertEquals(true, response.iterator().next().ignoreErrors()); - Assertions.assertEquals("xcjxgrytfmpcy", response.iterator().next().initTimeout()); - Assertions.assertEquals("mcayk", response.iterator().next().secretStoreComponent()); - Assertions.assertEquals("uztrksxwpndfcpf", response.iterator().next().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java deleted file mode 100644 index c832a2f40fc34..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprMetadataTests { - @Test - public void testDeserialize() { - DaprMetadata model = - BinaryData - .fromString("{\"name\":\"wp\",\"value\":\"sutrgjup\",\"secretRef\":\"utpwoqhihejqgw\"}") - .toObject(DaprMetadata.class); - Assertions.assertEquals("wp", model.name()); - Assertions.assertEquals("sutrgjup", model.value()); - Assertions.assertEquals("utpwoqhihejqgw", model.secretRef()); - } - - @Test - public void testSerialize() { - DaprMetadata model = new DaprMetadata().withName("wp").withValue("sutrgjup").withSecretRef("utpwoqhihejqgw"); - model = BinaryData.fromObject(model).toObject(DaprMetadata.class); - Assertions.assertEquals("wp", model.name()); - Assertions.assertEquals("sutrgjup", model.value()); - Assertions.assertEquals("utpwoqhihejqgw", model.secretRef()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java deleted file mode 100644 index ebe4e04a66a85..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprSecretsCollectionInnerTests { - @Test - public void testDeserialize() { - DaprSecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"fqntcyp\",\"value\":\"jv\"},{\"name\":\"imwkslircizj\",\"value\":\"ydfce\"},{\"name\":\"vlhv\",\"value\":\"dyftumrtwna\"}]}") - .toObject(DaprSecretsCollectionInner.class); - Assertions.assertEquals("fqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).value()); - } - - @Test - public void testSerialize() { - DaprSecretsCollectionInner model = - new DaprSecretsCollectionInner() - .withValue( - Arrays - .asList( - new Secret().withName("fqntcyp").withValue("jv"), - new Secret().withName("imwkslircizj").withValue("ydfce"), - new Secret().withName("vlhv").withValue("dyftumrtwna"))); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - Assertions.assertEquals("fqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 3b8027a54a9b1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprTests { - @Test - public void testDeserialize() { - Dapr model = - BinaryData - .fromString( - "{\"enabled\":true,\"appId\":\"prwmdyvxqt\",\"appProtocol\":\"http\",\"appPort\":357638492,\"httpReadBufferSize\":438099264,\"httpMaxRequestSize\":1692678524,\"logLevel\":\"debug\",\"enableApiLogging\":true}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("prwmdyvxqt", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(357638492, model.appPort()); - Assertions.assertEquals(438099264, model.httpReadBufferSize()); - Assertions.assertEquals(1692678524, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } - - @Test - public void testSerialize() { - Dapr model = - new Dapr() - .withEnabled(true) - .withAppId("prwmdyvxqt") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(357638492) - .withHttpReadBufferSize(438099264) - .withHttpMaxRequestSize(1692678524) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("prwmdyvxqt", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(357638492, model.appPort()); - Assertions.assertEquals(438099264, model.httpReadBufferSize()); - Assertions.assertEquals(1692678524, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java deleted file mode 100644 index 5df6832f94830..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DefaultAuthorizationPolicyTests { - @Test - public void testDeserialize() { - DefaultAuthorizationPolicy model = - BinaryData - .fromString( - "{\"allowedPrincipals\":{\"groups\":[\"nohjt\"],\"identities\":[\"h\",\"soifiyipjxsqw\",\"gr\"]},\"allowedApplications\":[\"norcjxvsnbyxqab\",\"mocpc\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("nohjt", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("h", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("norcjxvsnbyxqab", model.allowedApplications().get(0)); - } - - @Test - public void testSerialize() { - DefaultAuthorizationPolicy model = - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("nohjt")) - .withIdentities(Arrays.asList("h", "soifiyipjxsqw", "gr"))) - .withAllowedApplications(Arrays.asList("norcjxvsnbyxqab", "mocpc")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("nohjt", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("h", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("norcjxvsnbyxqab", model.allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java deleted file mode 100644 index 95594f2e8c2a4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; -import org.junit.jupiter.api.Test; - -public final class DefaultErrorResponseErrorTests { - @Test - public void testDeserialize() { - DefaultErrorResponseError model = - BinaryData.fromString("{\"innererror\":\"ofqweykhmenevfye\"}").toObject(DefaultErrorResponseError.class); - } - - @Test - public void testSerialize() { - DefaultErrorResponseError model = new DefaultErrorResponseError(); - model = BinaryData.fromObject(model).toObject(DefaultErrorResponseError.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java deleted file mode 100644 index 1ff9c37260cb1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @Test - public void testDeserialize() { - DiagnosticDataProviderMetadataPropertyBagItem model = - BinaryData - .fromString("{\"name\":\"egfnmntfpmvmemfn\",\"value\":\"dwvvba\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("egfnmntfpmvmemfn", model.name()); - Assertions.assertEquals("dwvvba", model.value()); - } - - @Test - public void testSerialize() { - DiagnosticDataProviderMetadataPropertyBagItem model = - new DiagnosticDataProviderMetadataPropertyBagItem().withName("egfnmntfpmvmemfn").withValue("dwvvba"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("egfnmntfpmvmemfn", model.name()); - Assertions.assertEquals("dwvvba", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java deleted file mode 100644 index 6296fe1163cc1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataProviderMetadataTests { - @Test - public void testDeserialize() { - DiagnosticDataProviderMetadata model = - BinaryData - .fromString( - "{\"providerName\":\"kkudzp\",\"propertyBag\":[{\"name\":\"plmag\",\"value\":\"cyohpfkyrkdbd\"},{\"name\":\"ogsjkmnwqjno\",\"value\":\"iyhddvi\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("kkudzp", model.providerName()); - Assertions.assertEquals("plmag", model.propertyBag().get(0).name()); - Assertions.assertEquals("cyohpfkyrkdbd", model.propertyBag().get(0).value()); - } - - @Test - public void testSerialize() { - DiagnosticDataProviderMetadata model = - new DiagnosticDataProviderMetadata() - .withProviderName("kkudzp") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("plmag") - .withValue("cyohpfkyrkdbd"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("ogsjkmnwqjno") - .withValue("iyhddvi"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("kkudzp", model.providerName()); - Assertions.assertEquals("plmag", model.propertyBag().get(0).name()); - Assertions.assertEquals("cyohpfkyrkdbd", model.propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java deleted file mode 100644 index 495097569ebc0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataTableResponseColumnTests { - @Test - public void testDeserialize() { - DiagnosticDataTableResponseColumn model = - BinaryData - .fromString("{\"columnName\":\"orbteoy\",\"dataType\":\"hjxa\",\"columnType\":\"vjgsl\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("orbteoy", model.columnName()); - Assertions.assertEquals("hjxa", model.dataType()); - Assertions.assertEquals("vjgsl", model.columnType()); - } - - @Test - public void testSerialize() { - DiagnosticDataTableResponseColumn model = - new DiagnosticDataTableResponseColumn() - .withColumnName("orbteoy") - .withDataType("hjxa") - .withColumnType("vjgsl"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("orbteoy", model.columnName()); - Assertions.assertEquals("hjxa", model.dataType()); - Assertions.assertEquals("vjgsl", model.columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java deleted file mode 100644 index 2b8439a752ceb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataTableResponseObjectTests { - @Test - public void testDeserialize() { - DiagnosticDataTableResponseObject model = - BinaryData - .fromString( - "{\"tableName\":\"xkcgxxlxsffgcvi\",\"columns\":[{\"columnName\":\"wlvwlyoupf\",\"dataType\":\"bkjubdyhgkfmins\",\"columnType\":\"wzf\"},{\"columnName\":\"sttktlahbqa\",\"dataType\":\"xtgzukxitmmqtgqq\",\"columnType\":\"hrnxrxc\"},{\"columnName\":\"uisavokq\",\"dataType\":\"fvazivjlfrqttba\",\"columnType\":\"katnwxyi\"},{\"columnName\":\"id\",\"dataType\":\"qfkuvscxkdmli\",\"columnType\":\"vibrxkpmloazuruo\"}],\"rows\":[]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tableName()); - Assertions.assertEquals("wlvwlyoupf", model.columns().get(0).columnName()); - Assertions.assertEquals("bkjubdyhgkfmins", model.columns().get(0).dataType()); - Assertions.assertEquals("wzf", model.columns().get(0).columnType()); - } - - @Test - public void testSerialize() { - DiagnosticDataTableResponseObject model = - new DiagnosticDataTableResponseObject() - .withTableName("xkcgxxlxsffgcvi") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("wlvwlyoupf") - .withDataType("bkjubdyhgkfmins") - .withColumnType("wzf"), - new DiagnosticDataTableResponseColumn() - .withColumnName("sttktlahbqa") - .withDataType("xtgzukxitmmqtgqq") - .withColumnType("hrnxrxc"), - new DiagnosticDataTableResponseColumn() - .withColumnName("uisavokq") - .withDataType("fvazivjlfrqttba") - .withColumnType("katnwxyi"), - new DiagnosticDataTableResponseColumn() - .withColumnName("id") - .withDataType("qfkuvscxkdmli") - .withColumnType("vibrxkpmloazuruo"))) - .withRows(Arrays.asList()); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tableName()); - Assertions.assertEquals("wlvwlyoupf", model.columns().get(0).columnName()); - Assertions.assertEquals("bkjubdyhgkfmins", model.columns().get(0).dataType()); - Assertions.assertEquals("wzf", model.columns().get(0).columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java deleted file mode 100644 index 57e77db319d42..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticRenderingTests { - @Test - public void testDeserialize() { - DiagnosticRendering model = - BinaryData - .fromString( - "{\"type\":1644045294,\"title\":\"lmywwtkgkxnyed\",\"description\":\"gyvudtjuewbc\",\"isVisible\":false}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(1644045294, model.type()); - Assertions.assertEquals("lmywwtkgkxnyed", model.title()); - Assertions.assertEquals("gyvudtjuewbc", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } - - @Test - public void testSerialize() { - DiagnosticRendering model = - new DiagnosticRendering() - .withType(1644045294) - .withTitle("lmywwtkgkxnyed") - .withDescription("gyvudtjuewbc") - .withIsVisible(false); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(1644045294, model.type()); - Assertions.assertEquals("lmywwtkgkxnyed", model.title()); - Assertions.assertEquals("gyvudtjuewbc", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index cc714f85b1c3f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import org.junit.jupiter.api.Test; - -public final class DiagnosticSupportTopicTests { - @Test - public void testDeserialize() { - DiagnosticSupportTopic model = - BinaryData - .fromString("{\"id\":\"wjhhgdnhxmsivf\",\"pesId\":\"iloxggdufiq\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @Test - public void testSerialize() { - DiagnosticSupportTopic model = new DiagnosticSupportTopic(); - model = BinaryData.fromObject(model).toObject(DiagnosticSupportTopic.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java deleted file mode 100644 index 7a2a5be7570a9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsCollectionInnerTests { - @Test - public void testDeserialize() { - DiagnosticsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"dataset\":[]},\"id\":\"ojgcyzt\",\"name\":\"fmznba\",\"type\":\"qphchqnrnrpxehuw\"}],\"nextLink\":\"k\"}") - .toObject(DiagnosticsCollectionInner.class); - } - - @Test - public void testSerialize() { - DiagnosticsCollectionInner model = - new DiagnosticsCollectionInner() - .withValue( - Arrays - .asList( - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties().withDataset(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index 04a2ef5693cdd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsDataApiResponseTests { - @Test - public void testDeserialize() { - DiagnosticsDataApiResponse model = - BinaryData - .fromString( - "{\"table\":{\"tableName\":\"euzaof\",\"columns\":[{\"columnName\":\"cyyysfgdot\",\"dataType\":\"biipuip\",\"columnType\":\"qonmacj\"},{\"columnName\":\"nizshqvcim\",\"dataType\":\"vfgmblrrilby\",\"columnType\":\"xsmiccwrwfscjf\"},{\"columnName\":\"nszqujiz\",\"dataType\":\"oqytibyowbblgy\",\"columnType\":\"utp\"}],\"rows\":[]},\"renderingProperties\":{\"type\":1814921702,\"title\":\"smsks\",\"description\":\"iml\",\"isVisible\":true}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("euzaof", model.table().tableName()); - Assertions.assertEquals("cyyysfgdot", model.table().columns().get(0).columnName()); - Assertions.assertEquals("biipuip", model.table().columns().get(0).dataType()); - Assertions.assertEquals("qonmacj", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814921702, model.renderingProperties().type()); - Assertions.assertEquals("smsks", model.renderingProperties().title()); - Assertions.assertEquals("iml", model.renderingProperties().description()); - Assertions.assertEquals(true, model.renderingProperties().isVisible()); - } - - @Test - public void testSerialize() { - DiagnosticsDataApiResponse model = - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("euzaof") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("cyyysfgdot") - .withDataType("biipuip") - .withColumnType("qonmacj"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nizshqvcim") - .withDataType("vfgmblrrilby") - .withColumnType("xsmiccwrwfscjf"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nszqujiz") - .withDataType("oqytibyowbblgy") - .withColumnType("utp"))) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1814921702) - .withTitle("smsks") - .withDescription("iml") - .withIsVisible(true)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("euzaof", model.table().tableName()); - Assertions.assertEquals("cyyysfgdot", model.table().columns().get(0).columnName()); - Assertions.assertEquals("biipuip", model.table().columns().get(0).dataType()); - Assertions.assertEquals("qonmacj", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814921702, model.renderingProperties().type()); - Assertions.assertEquals("smsks", model.renderingProperties().title()); - Assertions.assertEquals("iml", model.renderingProperties().description()); - Assertions.assertEquals(true, model.renderingProperties().isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java deleted file mode 100644 index bc2f584110f85..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsDefinitionTests { - @Test - public void testDeserialize() { - DiagnosticsDefinition model = - BinaryData - .fromString( - "{\"id\":\"wmd\",\"name\":\"wpklvxw\",\"description\":\"gdxpg\",\"author\":\"chisze\",\"category\":\"nb\",\"supportTopicList\":[{\"id\":\"gibbdaxc\",\"pesId\":\"fozauorsuk\"},{\"id\":\"wbqpl\",\"pesId\":\"vnuuepzl\"}],\"analysisTypes\":[\"wzsoldweyuqdunv\"],\"type\":\"nrwrbiork\",\"score\":33.805977}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("wzsoldweyuqdunv", model.analysisTypes().get(0)); - } - - @Test - public void testSerialize() { - DiagnosticsDefinition model = - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("wzsoldweyuqdunv")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("wzsoldweyuqdunv", model.analysisTypes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java deleted file mode 100644 index f69f93b1b0948..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsInnerTests { - @Test - public void testDeserialize() { - DiagnosticsInner model = - BinaryData - .fromString( - "{\"properties\":{\"metadata\":{\"id\":\"fmviklby\",\"name\":\"khbejdznxc\",\"description\":\"srhnjivo\",\"author\":\"tnovqfzgemjdftul\",\"category\":\"tduceamt\",\"supportTopicList\":[],\"analysisTypes\":[\"m\"],\"type\":\"wcw\",\"score\":57.057808},\"dataset\":[{},{},{}],\"status\":{\"message\":\"sv\",\"statusId\":750225964},\"dataProviderMetadata\":{\"providerName\":\"vk\",\"propertyBag\":[]}},\"id\":\"ql\",\"name\":\"yxgtczh\",\"type\":\"ydbsd\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("m", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sv", model.properties().status().message()); - Assertions.assertEquals(750225964, model.properties().status().statusId()); - Assertions.assertEquals("vk", model.properties().dataProviderMetadata().providerName()); - } - - @Test - public void testSerialize() { - DiagnosticsInner model = - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList()) - .withAnalysisTypes(Arrays.asList("m"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse(), - new DiagnosticsDataApiResponse(), - new DiagnosticsDataApiResponse())) - .withStatus(new DiagnosticsStatus().withMessage("sv").withStatusId(750225964)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("vk") - .withPropertyBag(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("m", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sv", model.properties().status().message()); - Assertions.assertEquals(750225964, model.properties().status().statusId()); - Assertions.assertEquals("vk", model.properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index ead64e3b0d1a0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsPropertiesTests { - @Test - public void testDeserialize() { - DiagnosticsProperties model = - BinaryData - .fromString( - "{\"metadata\":{\"id\":\"kx\",\"name\":\"ehvbbxurip\",\"description\":\"fnhtbaxkgxyw\",\"author\":\"kpyklyhp\",\"category\":\"odpvruudlgzib\",\"supportTopicList\":[{\"id\":\"tgk\",\"pesId\":\"tvdxeclzedqb\"},{\"id\":\"hzlhplodqkdlww\",\"pesId\":\"bum\"}],\"analysisTypes\":[\"trqjfsmlmbtx\",\"w\"],\"type\":\"wsrt\",\"score\":70.81028},\"dataset\":[{\"table\":{\"tableName\":\"rhubskhud\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":328293320,\"title\":\"qfqjbvleorfm\",\"description\":\"iqtqzfavyvnq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"yeua\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":1625919856,\"title\":\"gzslesjcbhernnti\",\"description\":\"djc\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rbe\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":52673301,\"title\":\"uffkmrqemvvh\",\"description\":\"tdrjfutacoebj\",\"isVisible\":true}}],\"status\":{\"message\":\"jznmwcpmguaa\",\"statusId\":1984994243},\"dataProviderMetadata\":{\"providerName\":\"actkahzovajj\",\"propertyBag\":[{\"name\":\"xps\",\"value\":\"eekulfgslqubkwd\"},{\"name\":\"nrdsutujbazpjuoh\",\"value\":\"nyfln\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("trqjfsmlmbtx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("rhubskhud", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(328293320, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qfqjbvleorfm", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("iqtqzfavyvnq", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jznmwcpmguaa", model.status().message()); - Assertions.assertEquals(1984994243, model.status().statusId()); - Assertions.assertEquals("actkahzovajj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("xps", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eekulfgslqubkwd", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @Test - public void testSerialize() { - DiagnosticsProperties model = - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("trqjfsmlmbtx", "w"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("rhubskhud") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(328293320) - .withTitle("qfqjbvleorfm") - .withDescription("iqtqzfavyvnq") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("yeua") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1625919856) - .withTitle("gzslesjcbhernnti") - .withDescription("djc") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("rbe") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(52673301) - .withTitle("uffkmrqemvvh") - .withDescription("tdrjfutacoebj") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("jznmwcpmguaa").withStatusId(1984994243)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("actkahzovajj") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("xps") - .withValue("eekulfgslqubkwd"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("nrdsutujbazpjuoh") - .withValue("nyfln")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("trqjfsmlmbtx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("rhubskhud", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(328293320, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qfqjbvleorfm", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("iqtqzfavyvnq", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jznmwcpmguaa", model.status().message()); - Assertions.assertEquals(1984994243, model.status().statusId()); - Assertions.assertEquals("actkahzovajj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("xps", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eekulfgslqubkwd", model.dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java deleted file mode 100644 index f99b750e5ba03..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsStatusTests { - @Test - public void testDeserialize() { - DiagnosticsStatus model = - BinaryData - .fromString("{\"message\":\"uwhcjyxccybv\",\"statusId\":940165825}") - .toObject(DiagnosticsStatus.class); - Assertions.assertEquals("uwhcjyxccybv", model.message()); - Assertions.assertEquals(940165825, model.statusId()); - } - - @Test - public void testSerialize() { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("uwhcjyxccybv").withStatusId(940165825); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("uwhcjyxccybv", model.message()); - Assertions.assertEquals(940165825, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java deleted file mode 100644 index 20e81e02a3b1d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; -import com.azure.resourcemanager.appcontainers.models.SkuName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentSkuPropertiesTests { - @Test - public void testDeserialize() { - EnvironmentSkuProperties model = - BinaryData.fromString("{\"name\":\"Consumption\"}").toObject(EnvironmentSkuProperties.class); - Assertions.assertEquals(SkuName.CONSUMPTION, model.name()); - } - - @Test - public void testSerialize() { - EnvironmentSkuProperties model = new EnvironmentSkuProperties().withName(SkuName.CONSUMPTION); - model = BinaryData.fromObject(model).toObject(EnvironmentSkuProperties.class); - Assertions.assertEquals(SkuName.CONSUMPTION, model.name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java deleted file mode 100644 index c3a507f7eeb20..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentVarTests { - @Test - public void testDeserialize() { - EnvironmentVar model = - BinaryData - .fromString("{\"name\":\"washr\",\"value\":\"tkcnqxwb\",\"secretRef\":\"kulpiujwaasi\"}") - .toObject(EnvironmentVar.class); - Assertions.assertEquals("washr", model.name()); - Assertions.assertEquals("tkcnqxwb", model.value()); - Assertions.assertEquals("kulpiujwaasi", model.secretRef()); - } - - @Test - public void testSerialize() { - EnvironmentVar model = - new EnvironmentVar().withName("washr").withValue("tkcnqxwb").withSecretRef("kulpiujwaasi"); - model = BinaryData.fromObject(model).toObject(EnvironmentVar.class); - Assertions.assertEquals("washr", model.name()); - Assertions.assertEquals("tkcnqxwb", model.value()); - Assertions.assertEquals("kulpiujwaasi", model.secretRef()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index e6683542350b8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ExtendedLocationTests { - @Test - public void testDeserialize() { - ExtendedLocation model = - BinaryData - .fromString("{\"name\":\"wrmjmwvvjektc\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("wrmjmwvvjektc", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @Test - public void testSerialize() { - ExtendedLocation model = - new ExtendedLocation().withName("wrmjmwvvjektc").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("wrmjmwvvjektc", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java deleted file mode 100644 index 42ca4bdea2c14..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class FacebookTests { - @Test - public void testDeserialize() { - Facebook model = - BinaryData - .fromString( - "{\"enabled\":false,\"registration\":{\"appId\":\"yulpkudjkr\",\"appSecretSettingName\":\"hbzhfepg\"},\"graphApiVersion\":\"qex\",\"login\":{\"scopes\":[\"xscpaierhhbc\"]}}") - .toObject(Facebook.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("yulpkudjkr", model.registration().appId()); - Assertions.assertEquals("hbzhfepg", model.registration().appSecretSettingName()); - Assertions.assertEquals("qex", model.graphApiVersion()); - Assertions.assertEquals("xscpaierhhbc", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - Facebook model = - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration().withAppId("yulpkudjkr").withAppSecretSettingName("hbzhfepg")) - .withGraphApiVersion("qex") - .withLogin(new LoginScopes().withScopes(Arrays.asList("xscpaierhhbc"))); - model = BinaryData.fromObject(model).toObject(Facebook.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("yulpkudjkr", model.registration().appId()); - Assertions.assertEquals("hbzhfepg", model.registration().appSecretSettingName()); - Assertions.assertEquals("qex", model.graphApiVersion()); - Assertions.assertEquals("xscpaierhhbc", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java deleted file mode 100644 index 34afcea8f5c42..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ForwardProxyTests { - @Test - public void testDeserialize() { - ForwardProxy model = - BinaryData - .fromString( - "{\"convention\":\"Custom\",\"customHostHeaderName\":\"jdyggdtji\",\"customProtoHeaderName\":\"b\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("jdyggdtji", model.customHostHeaderName()); - Assertions.assertEquals("b", model.customProtoHeaderName()); - } - - @Test - public void testSerialize() { - ForwardProxy model = - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("jdyggdtji") - .withCustomProtoHeaderName("b"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("jdyggdtji", model.customHostHeaderName()); - Assertions.assertEquals("b", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java deleted file mode 100644 index f8ffb579c3cbb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GitHubTests { - @Test - public void testDeserialize() { - GitHub model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"mvdjwzrlovmc\",\"clientSecretSettingName\":\"hijco\"},\"login\":{\"scopes\":[\"bzaqsqsycbkbfk\",\"ukdkexxppofmxa\",\"c\",\"jpgd\"]}}") - .toObject(GitHub.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mvdjwzrlovmc", model.registration().clientId()); - Assertions.assertEquals("hijco", model.registration().clientSecretSettingName()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - GitHub model = - new GitHub() - .withEnabled(true) - .withRegistration( - new ClientRegistration().withClientId("mvdjwzrlovmc").withClientSecretSettingName("hijco")) - .withLogin( - new LoginScopes().withScopes(Arrays.asList("bzaqsqsycbkbfk", "ukdkexxppofmxa", "c", "jpgd"))); - model = BinaryData.fromObject(model).toObject(GitHub.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mvdjwzrlovmc", model.registration().clientId()); - Assertions.assertEquals("hijco", model.registration().clientSecretSettingName()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java deleted file mode 100644 index 10020a6f8e968..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GlobalValidationTests { - @Test - public void testDeserialize() { - GlobalValidation model = - BinaryData - .fromString( - "{\"unauthenticatedClientAction\":\"AllowAnonymous\",\"redirectToProvider\":\"qnjaqwix\",\"excludedPaths\":[\"r\",\"zvcputegjvwmfda\",\"scmdvpjhulsuu\",\"mkjozkrwf\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } - - @Test - public void testSerialize() { - GlobalValidation model = - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS) - .withRedirectToProvider("qnjaqwix") - .withExcludedPaths(Arrays.asList("r", "zvcputegjvwmfda", "scmdvpjhulsuu", "mkjozkrwf")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java deleted file mode 100644 index 179b069ab5f62..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GoogleTests { - @Test - public void testDeserialize() { - Google model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"dntwndeicbtw\",\"clientSecretSettingName\":\"zao\"},\"login\":{\"scopes\":[\"rhcffcydd\",\"lmjthjq\",\"wpyeicxmqciwqvh\",\"hix\"]},\"validation\":{\"allowedAudiences\":[\"topbobjogh\",\"e\"]}}") - .toObject(Google.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dntwndeicbtw", model.registration().clientId()); - Assertions.assertEquals("zao", model.registration().clientSecretSettingName()); - Assertions.assertEquals("rhcffcydd", model.login().scopes().get(0)); - Assertions.assertEquals("topbobjogh", model.validation().allowedAudiences().get(0)); - } - - @Test - public void testSerialize() { - Google model = - new Google() - .withEnabled(true) - .withRegistration( - new ClientRegistration().withClientId("dntwndeicbtw").withClientSecretSettingName("zao")) - .withLogin( - new LoginScopes().withScopes(Arrays.asList("rhcffcydd", "lmjthjq", "wpyeicxmqciwqvh", "hix"))) - .withValidation( - new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("topbobjogh", "e"))); - model = BinaryData.fromObject(model).toObject(Google.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dntwndeicbtw", model.registration().clientId()); - Assertions.assertEquals("zao", model.registration().clientSecretSettingName()); - Assertions.assertEquals("rhcffcydd", model.login().scopes().get(0)); - Assertions.assertEquals("topbobjogh", model.validation().allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java deleted file mode 100644 index b7b63122ec5d8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpScaleRuleTests { - @Test - public void testDeserialize() { - HttpScaleRule model = - BinaryData - .fromString( - "{\"metadata\":{\"x\":\"zuf\",\"khazxkhnzbonlwn\":\"iqopidoamciod\",\"szzcmrvexztv\":\"oegokdwbwh\",\"gsfraoyzkoow\":\"t\"},\"auth\":[{\"secretRef\":\"guxawqaldsyuuxi\",\"triggerParameter\":\"rqf\"},{\"secretRef\":\"wyznkbyku\",\"triggerParameter\":\"pfhpagmhrskdsnfd\"},{\"secretRef\":\"oakgtdlmkkzev\",\"triggerParameter\":\"hewpusdsttwv\"},{\"secretRef\":\"vbbejdcng\",\"triggerParameter\":\"m\"}]}") - .toObject(HttpScaleRule.class); - Assertions.assertEquals("zuf", model.metadata().get("x")); - Assertions.assertEquals("guxawqaldsyuuxi", model.auth().get(0).secretRef()); - Assertions.assertEquals("rqf", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - HttpScaleRule model = - new HttpScaleRule() - .withMetadata( - mapOf( - "x", - "zuf", - "khazxkhnzbonlwn", - "iqopidoamciod", - "szzcmrvexztv", - "oegokdwbwh", - "gsfraoyzkoow", - "t")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("guxawqaldsyuuxi").withTriggerParameter("rqf"), - new ScaleRuleAuth().withSecretRef("wyznkbyku").withTriggerParameter("pfhpagmhrskdsnfd"), - new ScaleRuleAuth().withSecretRef("oakgtdlmkkzev").withTriggerParameter("hewpusdsttwv"), - new ScaleRuleAuth().withSecretRef("vbbejdcng").withTriggerParameter("m"))); - model = BinaryData.fromObject(model).toObject(HttpScaleRule.class); - Assertions.assertEquals("zuf", model.metadata().get("x")); - Assertions.assertEquals("guxawqaldsyuuxi", model.auth().get(0).secretRef()); - Assertions.assertEquals("rqf", model.auth().get(0).triggerParameter()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index 3c0b760a04e2e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpSettingsRoutesTests { - @Test - public void testDeserialize() { - HttpSettingsRoutes model = - BinaryData.fromString("{\"apiPrefix\":\"ujjugwdkcglh\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ujjugwdkcglh", model.apiPrefix()); - } - - @Test - public void testSerialize() { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("ujjugwdkcglh"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ujjugwdkcglh", model.apiPrefix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java deleted file mode 100644 index eca2bf69f4de8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpSettingsTests { - @Test - public void testDeserialize() { - HttpSettings model = - BinaryData - .fromString( - "{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"zwdejbavor\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"hctbqvudwxdn\",\"customProtoHeaderName\":\"vo\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("zwdejbavor", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("hctbqvudwxdn", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("vo", model.forwardProxy().customProtoHeaderName()); - } - - @Test - public void testSerialize() { - HttpSettings model = - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("zwdejbavor")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("hctbqvudwxdn") - .withCustomProtoHeaderName("vo")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("zwdejbavor", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("hctbqvudwxdn", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("vo", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java deleted file mode 100644 index 13301ab6eee78..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IngressTests { - @Test - public void testDeserialize() { - Ingress model = - BinaryData - .fromString( - "{\"fqdn\":\"rqhakauha\",\"external\":true,\"targetPort\":706986266,\"exposedPort\":949379958,\"transport\":\"http\",\"traffic\":[{\"revisionName\":\"cugicjoox\",\"weight\":554056666,\"latestRevision\":true,\"label\":\"ucww\"}],\"customDomains\":[{\"name\":\"vbvmeu\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"vyhzceuojgjrwj\"},{\"name\":\"eiotwmcdytdx\",\"bindingType\":\"Disabled\",\"certificateId\":\"xnrj\"},{\"name\":\"wgqwgxhn\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"x\"}],\"allowInsecure\":true,\"ipSecurityRestrictions\":[{\"name\":\"cg\",\"description\":\"wndnhj\",\"ipAddressRange\":\"auwhvylwzbtdhx\",\"action\":\"Allow\"}]}") - .toObject(Ingress.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(706986266, model.targetPort()); - Assertions.assertEquals(949379958, model.exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.transport()); - Assertions.assertEquals("cugicjoox", model.traffic().get(0).revisionName()); - Assertions.assertEquals(554056666, model.traffic().get(0).weight()); - Assertions.assertEquals(true, model.traffic().get(0).latestRevision()); - Assertions.assertEquals("ucww", model.traffic().get(0).label()); - Assertions.assertEquals("vbvmeu", model.customDomains().get(0).name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.customDomains().get(0).bindingType()); - Assertions.assertEquals("vyhzceuojgjrwj", model.customDomains().get(0).certificateId()); - Assertions.assertEquals(true, model.allowInsecure()); - Assertions.assertEquals("cg", model.ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("wndnhj", model.ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("auwhvylwzbtdhx", model.ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.ipSecurityRestrictions().get(0).action()); - } - - @Test - public void testSerialize() { - Ingress model = - new Ingress() - .withExternal(true) - .withTargetPort(706986266) - .withExposedPort(949379958) - .withTransport(IngressTransportMethod.HTTP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("cugicjoox") - .withWeight(554056666) - .withLatestRevision(true) - .withLabel("ucww"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("vbvmeu") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("vyhzceuojgjrwj"), - new CustomDomain() - .withName("eiotwmcdytdx") - .withBindingType(BindingType.DISABLED) - .withCertificateId("xnrj"), - new CustomDomain() - .withName("wgqwgxhn") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("x"))) - .withAllowInsecure(true) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("cg") - .withDescription("wndnhj") - .withIpAddressRange("auwhvylwzbtdhx") - .withAction(Action.ALLOW))); - model = BinaryData.fromObject(model).toObject(Ingress.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(706986266, model.targetPort()); - Assertions.assertEquals(949379958, model.exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.transport()); - Assertions.assertEquals("cugicjoox", model.traffic().get(0).revisionName()); - Assertions.assertEquals(554056666, model.traffic().get(0).weight()); - Assertions.assertEquals(true, model.traffic().get(0).latestRevision()); - Assertions.assertEquals("ucww", model.traffic().get(0).label()); - Assertions.assertEquals("vbvmeu", model.customDomains().get(0).name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.customDomains().get(0).bindingType()); - Assertions.assertEquals("vyhzceuojgjrwj", model.customDomains().get(0).certificateId()); - Assertions.assertEquals(true, model.allowInsecure()); - Assertions.assertEquals("cg", model.ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("wndnhj", model.ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("auwhvylwzbtdhx", model.ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.ipSecurityRestrictions().get(0).action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java deleted file mode 100644 index af16468c0e501..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class InitContainerTests { - @Test - public void testDeserialize() { - InitContainer model = - BinaryData - .fromString( - "{\"image\":\"ogqxndlkzgxhuri\",\"name\":\"bpodxunkbebxm\",\"command\":[\"yntwlrbq\",\"koievseo\"],\"args\":[\"rlltmuwlauwzizx\"],\"env\":[{\"name\":\"cjefuzmu\",\"value\":\"bttdumorppxe\",\"secretRef\":\"nzbtbhj\"},{\"name\":\"lkfg\",\"value\":\"dneu\",\"secretRef\":\"fphsdyhtozfikdow\"},{\"name\":\"uuvxz\",\"value\":\"lvithhqzonosgg\",\"secretRef\":\"c\"}],\"resources\":{\"cpu\":61.21975235277173,\"memory\":\"jnkaljutiiswacff\",\"ephemeralStorage\":\"k\"},\"volumeMounts\":[{\"volumeName\":\"kfvhqcrailvpn\",\"mountPath\":\"fuflrwdmhdlx\"},{\"volumeName\":\"rxsagafcnihgwqa\",\"mountPath\":\"edgfbcvkcvq\"},{\"volumeName\":\"keqdcvdrhvoods\",\"mountPath\":\"bobzdopcjwvnhd\"}]}") - .toObject(InitContainer.class); - Assertions.assertEquals("ogqxndlkzgxhuri", model.image()); - Assertions.assertEquals("bpodxunkbebxm", model.name()); - Assertions.assertEquals("yntwlrbq", model.command().get(0)); - Assertions.assertEquals("rlltmuwlauwzizx", model.args().get(0)); - Assertions.assertEquals("cjefuzmu", model.env().get(0).name()); - Assertions.assertEquals("bttdumorppxe", model.env().get(0).value()); - Assertions.assertEquals("nzbtbhj", model.env().get(0).secretRef()); - Assertions.assertEquals(61.21975235277173D, model.resources().cpu()); - Assertions.assertEquals("jnkaljutiiswacff", model.resources().memory()); - Assertions.assertEquals("kfvhqcrailvpn", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("fuflrwdmhdlx", model.volumeMounts().get(0).mountPath()); - } - - @Test - public void testSerialize() { - InitContainer model = - new InitContainer() - .withImage("ogqxndlkzgxhuri") - .withName("bpodxunkbebxm") - .withCommand(Arrays.asList("yntwlrbq", "koievseo")) - .withArgs(Arrays.asList("rlltmuwlauwzizx")) - .withEnv( - Arrays - .asList( - new EnvironmentVar() - .withName("cjefuzmu") - .withValue("bttdumorppxe") - .withSecretRef("nzbtbhj"), - new EnvironmentVar().withName("lkfg").withValue("dneu").withSecretRef("fphsdyhtozfikdow"), - new EnvironmentVar().withName("uuvxz").withValue("lvithhqzonosgg").withSecretRef("c"))) - .withResources(new ContainerResources().withCpu(61.21975235277173D).withMemory("jnkaljutiiswacff")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("kfvhqcrailvpn").withMountPath("fuflrwdmhdlx"), - new VolumeMount().withVolumeName("rxsagafcnihgwqa").withMountPath("edgfbcvkcvq"), - new VolumeMount().withVolumeName("keqdcvdrhvoods").withMountPath("bobzdopcjwvnhd"))); - model = BinaryData.fromObject(model).toObject(InitContainer.class); - Assertions.assertEquals("ogqxndlkzgxhuri", model.image()); - Assertions.assertEquals("bpodxunkbebxm", model.name()); - Assertions.assertEquals("yntwlrbq", model.command().get(0)); - Assertions.assertEquals("rlltmuwlauwzizx", model.args().get(0)); - Assertions.assertEquals("cjefuzmu", model.env().get(0).name()); - Assertions.assertEquals("bttdumorppxe", model.env().get(0).value()); - Assertions.assertEquals("nzbtbhj", model.env().get(0).secretRef()); - Assertions.assertEquals(61.21975235277173D, model.resources().cpu()); - Assertions.assertEquals("jnkaljutiiswacff", model.resources().memory()); - Assertions.assertEquals("kfvhqcrailvpn", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("fuflrwdmhdlx", model.volumeMounts().get(0).mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 46ffee4349ed2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IpSecurityRestrictionRuleTests { - @Test - public void testDeserialize() { - IpSecurityRestrictionRule model = - BinaryData - .fromString( - "{\"name\":\"gw\",\"description\":\"vlvqhjkbegi\",\"ipAddressRange\":\"t\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("gw", model.name()); - Assertions.assertEquals("vlvqhjkbegi", model.description()); - Assertions.assertEquals("t", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @Test - public void testSerialize() { - IpSecurityRestrictionRule model = - new IpSecurityRestrictionRule() - .withName("gw") - .withDescription("vlvqhjkbegi") - .withIpAddressRange("t") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("gw", model.name()); - Assertions.assertEquals("vlvqhjkbegi", model.description()); - Assertions.assertEquals("t", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java deleted file mode 100644 index 145f7fcb84cf6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class JwtClaimChecksTests { - @Test - public void testDeserialize() { - JwtClaimChecks model = - BinaryData - .fromString( - "{\"allowedGroups\":[\"qpteeh\",\"zvypyqrimzinp\"],\"allowedClientApplications\":[\"jdkirsoodqx\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("qpteeh", model.allowedGroups().get(0)); - Assertions.assertEquals("jdkirsoodqx", model.allowedClientApplications().get(0)); - } - - @Test - public void testSerialize() { - JwtClaimChecks model = - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("qpteeh", "zvypyqrimzinp")) - .withAllowedClientApplications(Arrays.asList("jdkirsoodqx")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("qpteeh", model.allowedGroups().get(0)); - Assertions.assertEquals("jdkirsoodqx", model.allowedClientApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java deleted file mode 100644 index 45f53f49ccabb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginRoutesTests { - @Test - public void testDeserialize() { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"ynpwlbj\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("ynpwlbj", model.logoutEndpoint()); - } - - @Test - public void testSerialize() { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("ynpwlbj"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("ynpwlbj", model.logoutEndpoint()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java deleted file mode 100644 index 17b344da6d8cf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginScopesTests { - @Test - public void testDeserialize() { - LoginScopes model = - BinaryData - .fromString("{\"scopes\":[\"nbdxk\",\"pxokajionp\",\"mexgstxgcp\",\"dg\"]}") - .toObject(LoginScopes.class); - Assertions.assertEquals("nbdxk", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("nbdxk", "pxokajionp", "mexgstxgcp", "dg")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("nbdxk", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java deleted file mode 100644 index 11562c775556b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginTests { - @Test - public void testDeserialize() { - Login model = - BinaryData - .fromString( - "{\"routes\":{\"logoutEndpoint\":\"jumasx\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"yegu\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"xhejjzzvdud\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"fhotw\"}}") - .toObject(Login.class); - Assertions.assertEquals("jumasx", model.routes().logoutEndpoint()); - Assertions.assertEquals(false, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("yegu", model.allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.cookieExpiration().convention()); - Assertions.assertEquals("xhejjzzvdud", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("fhotw", model.nonce().nonceExpirationInterval()); - } - - @Test - public void testSerialize() { - Login model = - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("jumasx")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("yegu")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("xhejjzzvdud")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("fhotw")); - model = BinaryData.fromObject(model).toObject(Login.class); - Assertions.assertEquals("jumasx", model.routes().logoutEndpoint()); - Assertions.assertEquals(false, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("yegu", model.allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.cookieExpiration().convention()); - Assertions.assertEquals("xhejjzzvdud", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("fhotw", model.nonce().nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java deleted file mode 100644 index 44c4894e66531..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedEnvironmentOutboundSettingsTests { - @Test - public void testDeserialize() { - ManagedEnvironmentOutboundSettings model = - BinaryData - .fromString("{\"outBoundType\":\"UserDefinedRouting\",\"virtualNetworkApplianceIp\":\"l\"}") - .toObject(ManagedEnvironmentOutboundSettings.class); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING, model.outBoundType()); - Assertions.assertEquals("l", model.virtualNetworkApplianceIp()); - } - - @Test - public void testSerialize() { - ManagedEnvironmentOutboundSettings model = - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) - .withVirtualNetworkApplianceIp("l"); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentOutboundSettings.class); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING, model.outBoundType()); - Assertions.assertEquals("l", model.virtualNetworkApplianceIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 8cdd205d2c8c0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ManagedEnvironmentStoragesCollectionInnerTests { - @Test - public void testDeserialize() { - ManagedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"ob\",\"name\":\"lftidgfcwqmpim\",\"type\":\"qxzhem\"},{\"properties\":{},\"id\":\"hujswtwkozzwcul\",\"name\":\"bawpfajnjwltlwt\",\"type\":\"j\"},{\"properties\":{},\"id\":\"alhsnvkc\",\"name\":\"mxzrpoa\",\"type\":\"mlnwiaaomylweazu\"},{\"properties\":{},\"id\":\"thwwn\",\"name\":\"jhlfzswpchwahf\",\"type\":\"ousnfepgfewe\"}]}") - .toObject(ManagedEnvironmentStoragesCollectionInner.class); - } - - @Test - public void testSerialize() { - ManagedEnvironmentStoragesCollectionInner model = - new ManagedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentStoragesCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 89cd42aeeb105..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironments().delete("owa", "iynknlq", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java deleted file mode 100644 index dc608af595c67..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"minimumCount\":1932910769,\"maximumCount\":356571550,\"currentCount\":150383679},\"id\":\"ygjbmzyospspsh\",\"name\":\"kfkyjp\",\"type\":\"sp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.managedEnvironments().listWorkloadProfileStates("zdvpiw", "xqszdtmaajquh", Context.NONE); - - Assertions.assertEquals(1932910769, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(356571550, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(150383679, response.iterator().next().properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 9a173242c2186..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedServiceIdentityTests { - @Test - public void testDeserialize() { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"frzpwvlqdqgb\":{},\"lihkaetcktvfc\":{},\"snkymuctq\":{},\"bebrjcxerfuwuttt\":{}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @Test - public void testSerialize() { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "frzpwvlqdqgb", - new UserAssignedIdentity(), - "lihkaetcktvfc", - new UserAssignedIdentity(), - "snkymuctq", - new UserAssignedIdentity(), - "bebrjcxerfuwuttt", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index 9edebf90dfe79..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NonceTests { - @Test - public void testDeserialize() { - Nonce model = - BinaryData - .fromString("{\"validateNonce\":false,\"nonceExpirationInterval\":\"yfsoppu\"}") - .toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("yfsoppu", model.nonceExpirationInterval()); - } - - @Test - public void testSerialize() { - Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("yfsoppu"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("yfsoppu", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java deleted file mode 100644 index ee854acd908ae..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ClientCredentialMethod; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectClientCredential; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OpenIdConnectClientCredentialTests { - @Test - public void testDeserialize() { - OpenIdConnectClientCredential model = - BinaryData - .fromString("{\"method\":\"ClientSecretPost\",\"clientSecretSettingName\":\"tzxdpnqbqqwx\"}") - .toObject(OpenIdConnectClientCredential.class); - Assertions.assertEquals(ClientCredentialMethod.CLIENT_SECRET_POST, model.method()); - Assertions.assertEquals("tzxdpnqbqqwx", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - OpenIdConnectClientCredential model = - new OpenIdConnectClientCredential() - .withMethod(ClientCredentialMethod.CLIENT_SECRET_POST) - .withClientSecretSettingName("tzxdpnqbqqwx"); - model = BinaryData.fromObject(model).toObject(OpenIdConnectClientCredential.class); - Assertions.assertEquals(ClientCredentialMethod.CLIENT_SECRET_POST, model.method()); - Assertions.assertEquals("tzxdpnqbqqwx", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java deleted file mode 100644 index 6afae76954b89..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OpenIdConnectLoginTests { - @Test - public void testDeserialize() { - OpenIdConnectLogin model = - BinaryData - .fromString( - "{\"nameClaimType\":\"scxaq\",\"scopes\":[\"chcbonqvpkvlrxnj\",\"ase\",\"pheoflokeyy\",\"enjbdlwtgrhp\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("scxaq", model.nameClaimType()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - OpenIdConnectLogin model = - new OpenIdConnectLogin() - .withNameClaimType("scxaq") - .withScopes(Arrays.asList("chcbonqvpkvlrxnj", "ase", "pheoflokeyy", "enjbdlwtgrhp")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("scxaq", model.nameClaimType()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java deleted file mode 100644 index bb6d2928426c1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDetailInnerTests { - @Test - public void testDeserialize() { - OperationDetailInner model = - BinaryData - .fromString( - "{\"name\":\"qyuvvfonkp\",\"isDataAction\":false,\"display\":{\"provider\":\"kvylauyavl\",\"resource\":\"mncsttijfybvp\",\"operation\":\"krsgsgb\",\"description\":\"uzqgnjdgkynsc\"},\"origin\":\"qhzvhxnkomt\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("qyuvvfonkp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("kvylauyavl", model.display().provider()); - Assertions.assertEquals("mncsttijfybvp", model.display().resource()); - Assertions.assertEquals("krsgsgb", model.display().operation()); - Assertions.assertEquals("uzqgnjdgkynsc", model.display().description()); - Assertions.assertEquals("qhzvhxnkomt", model.origin()); - } - - @Test - public void testSerialize() { - OperationDetailInner model = - new OperationDetailInner() - .withName("qyuvvfonkp") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("kvylauyavl") - .withResource("mncsttijfybvp") - .withOperation("krsgsgb") - .withDescription("uzqgnjdgkynsc")) - .withOrigin("qhzvhxnkomt"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("qyuvvfonkp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("kvylauyavl", model.display().provider()); - Assertions.assertEquals("mncsttijfybvp", model.display().resource()); - Assertions.assertEquals("krsgsgb", model.display().operation()); - Assertions.assertEquals("uzqgnjdgkynsc", model.display().description()); - Assertions.assertEquals("qhzvhxnkomt", model.origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java deleted file mode 100644 index feb8216ddb9fe..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"bo\",\"resource\":\"pnvdxz\",\"operation\":\"ihfrbbcevqa\",\"description\":\"ltd\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("bo", model.provider()); - Assertions.assertEquals("pnvdxz", model.resource()); - Assertions.assertEquals("ihfrbbcevqa", model.operation()); - Assertions.assertEquals("ltd", model.description()); - } - - @Test - public void testSerialize() { - OperationDisplay model = - new OperationDisplay() - .withProvider("bo") - .withResource("pnvdxz") - .withOperation("ihfrbbcevqa") - .withDescription("ltd"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("bo", model.provider()); - Assertions.assertEquals("pnvdxz", model.resource()); - Assertions.assertEquals("ihfrbbcevqa", model.operation()); - Assertions.assertEquals("ltd", model.description()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java deleted file mode 100644 index 46c0b3a54f056..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"kgozxwop\",\"isDataAction\":false,\"display\":{\"provider\":\"izqaclnapxbiyg\",\"resource\":\"gjkn\",\"operation\":\"mfcttux\",\"description\":\"yilflqoiquvrehmr\"},\"origin\":\"hvsujztc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - - Assertions.assertEquals("kgozxwop", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("izqaclnapxbiyg", response.iterator().next().display().provider()); - Assertions.assertEquals("gjkn", response.iterator().next().display().resource()); - Assertions.assertEquals("mfcttux", response.iterator().next().display().operation()); - Assertions.assertEquals("yilflqoiquvrehmr", response.iterator().next().display().description()); - Assertions.assertEquals("hvsujztc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java deleted file mode 100644 index 71b0cc930752a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class QueueScaleRuleTests { - @Test - public void testDeserialize() { - QueueScaleRule model = - BinaryData - .fromString( - "{\"queueName\":\"bqwcsdbnwdcf\",\"queueLength\":1857074792,\"auth\":[{\"secretRef\":\"fuvglsbjjca\",\"triggerParameter\":\"xbvtvudu\"},{\"secretRef\":\"cormr\",\"triggerParameter\":\"qtvcofudflvkgj\"}]}") - .toObject(QueueScaleRule.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.queueName()); - Assertions.assertEquals(1857074792, model.queueLength()); - Assertions.assertEquals("fuvglsbjjca", model.auth().get(0).secretRef()); - Assertions.assertEquals("xbvtvudu", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - QueueScaleRule model = - new QueueScaleRule() - .withQueueName("bqwcsdbnwdcf") - .withQueueLength(1857074792) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("fuvglsbjjca").withTriggerParameter("xbvtvudu"), - new ScaleRuleAuth().withSecretRef("cormr").withTriggerParameter("qtvcofudflvkgj"))); - model = BinaryData.fromObject(model).toObject(QueueScaleRule.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.queueName()); - Assertions.assertEquals(1857074792, model.queueLength()); - Assertions.assertEquals("fuvglsbjjca", model.auth().get(0).secretRef()); - Assertions.assertEquals("xbvtvudu", model.auth().get(0).triggerParameter()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java deleted file mode 100644 index 361335f269c8d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegistryCredentialsTests { - @Test - public void testDeserialize() { - RegistryCredentials model = - BinaryData - .fromString( - "{\"server\":\"iebwwaloayqcgwrt\",\"username\":\"uzgwyzmhtx\",\"passwordSecretRef\":\"gmtsavjcbpwxqpsr\",\"identity\":\"ftguv\"}") - .toObject(RegistryCredentials.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.server()); - Assertions.assertEquals("uzgwyzmhtx", model.username()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.passwordSecretRef()); - Assertions.assertEquals("ftguv", model.identity()); - } - - @Test - public void testSerialize() { - RegistryCredentials model = - new RegistryCredentials() - .withServer("iebwwaloayqcgwrt") - .withUsername("uzgwyzmhtx") - .withPasswordSecretRef("gmtsavjcbpwxqpsr") - .withIdentity("ftguv"); - model = BinaryData.fromObject(model).toObject(RegistryCredentials.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.server()); - Assertions.assertEquals("uzgwyzmhtx", model.username()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.passwordSecretRef()); - Assertions.assertEquals("ftguv", model.identity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java deleted file mode 100644 index d17152ba628ec..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.RegistryInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegistryInfoTests { - @Test - public void testDeserialize() { - RegistryInfo model = - BinaryData - .fromString( - "{\"registryUrl\":\"fakeUrlPlaceholder\",\"registryUserName\":\"fakeNamePlaceholder\",\"registryPassword\":\"fakePasswordPlaceholder\"}") - .toObject(RegistryInfo.class); - Assertions.assertEquals("fakeUrlPlaceholder", model.registryUrl()); - Assertions.assertEquals("fakeNamePlaceholder", model.registryUsername()); - Assertions.assertEquals("fakePasswordPlaceholder", model.registryPassword()); - } - - @Test - public void testSerialize() { - RegistryInfo model = - new RegistryInfo() - .withRegistryUrl("fakeUrlPlaceholder") - .withRegistryUsername("fakeNamePlaceholder") - .withRegistryPassword("fakePasswordPlaceholder"); - model = BinaryData.fromObject(model).toObject(RegistryInfo.class); - Assertions.assertEquals("fakeUrlPlaceholder", model.registryUrl()); - Assertions.assertEquals("fakeNamePlaceholder", model.registryUsername()); - Assertions.assertEquals("fakePasswordPlaceholder", model.registryPassword()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java deleted file mode 100644 index 5a74a66a414c2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ReplicaCollectionInnerTests { - @Test - public void testDeserialize() { - ReplicaCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-01-22T12:04:18Z\",\"containers\":[]},\"id\":\"fffiak\",\"name\":\"jpqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"createdTime\":\"2021-06-27T09:23:26Z\",\"containers\":[]},\"id\":\"ncyg\",\"name\":\"p\",\"type\":\"vipmdscwxqupevzh\"}]}") - .toObject(ReplicaCollectionInner.class); - } - - @Test - public void testSerialize() { - ReplicaCollectionInner model = - new ReplicaCollectionInner() - .withValue( - Arrays - .asList( - new ReplicaInner().withContainers(Arrays.asList()), - new ReplicaInner().withContainers(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index cc77f7b8f1c75..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaContainerTests { - @Test - public void testDeserialize() { - ReplicaContainer model = - BinaryData - .fromString( - "{\"name\":\"fhsxttaugz\",\"containerId\":\"faazpxdtnkdmkqjj\",\"ready\":false,\"started\":false,\"restartCount\":1886433502,\"logStreamEndpoint\":\"pyouaibrebqaays\",\"execEndpoint\":\"ixqtn\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("fhsxttaugz", model.name()); - Assertions.assertEquals("faazpxdtnkdmkqjj", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1886433502, model.restartCount()); - } - - @Test - public void testSerialize() { - ReplicaContainer model = - new ReplicaContainer() - .withName("fhsxttaugz") - .withContainerId("faazpxdtnkdmkqjj") - .withReady(false) - .withStarted(false) - .withRestartCount(1886433502); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("fhsxttaugz", model.name()); - Assertions.assertEquals("faazpxdtnkdmkqjj", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1886433502, model.restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java deleted file mode 100644 index 2bc20409ed83b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaInnerTests { - @Test - public void testDeserialize() { - ReplicaInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-03-31T08:41:02Z\",\"containers\":[{\"name\":\"nkhtjsyingw\",\"containerId\":\"atmtdhtmdvy\",\"ready\":true,\"started\":true,\"restartCount\":624157964,\"logStreamEndpoint\":\"ywkbirryuzhlhkjo\",\"execEndpoint\":\"vqqaatjinrvgo\"},{\"name\":\"mfiibfggj\",\"containerId\":\"olvrw\",\"ready\":false,\"started\":false,\"restartCount\":1621053169,\"logStreamEndpoint\":\"lqwjygvjayvblm\",\"execEndpoint\":\"k\"}]},\"id\":\"hbxvvyhgsopbyrqu\",\"name\":\"egxuvwzf\",\"type\":\"nhlmctlpdng\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("nkhtjsyingw", model.containers().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(624157964, model.containers().get(0).restartCount()); - } - - @Test - public void testSerialize() { - ReplicaInner model = - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("nkhtjsyingw") - .withContainerId("atmtdhtmdvy") - .withReady(true) - .withStarted(true) - .withRestartCount(624157964), - new ReplicaContainer() - .withName("mfiibfggj") - .withContainerId("olvrw") - .withReady(false) - .withStarted(false) - .withRestartCount(1621053169))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("nkhtjsyingw", model.containers().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(624157964, model.containers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 93258565b3ca3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaPropertiesTests { - @Test - public void testDeserialize() { - ReplicaProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-01-29T19:24:27Z\",\"containers\":[{\"name\":\"hrixkwmy\",\"containerId\":\"ejvegrhbpnaixex\",\"ready\":false,\"started\":true,\"restartCount\":303838192,\"logStreamEndpoint\":\"hcexdrrvqa\",\"execEndpoint\":\"kghtpwijnh\"},{\"name\":\"svfycxzbfv\",\"containerId\":\"wvrvmtg\",\"ready\":true,\"started\":false,\"restartCount\":213302833,\"logStreamEndpoint\":\"ronzmyhgfip\",\"execEndpoint\":\"xkmcwaekrrjre\"},{\"name\":\"xt\",\"containerId\":\"umh\",\"ready\":false,\"started\":false,\"restartCount\":401545193,\"logStreamEndpoint\":\"slol\",\"execEndpoint\":\"pvuzlmv\"},{\"name\":\"lfktgplcrpwjxe\",\"containerId\":\"oi\",\"ready\":false,\"started\":true,\"restartCount\":509080980,\"logStreamEndpoint\":\"kpnb\",\"execEndpoint\":\"zejjoqk\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("hrixkwmy", model.containers().get(0).name()); - Assertions.assertEquals("ejvegrhbpnaixex", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(303838192, model.containers().get(0).restartCount()); - } - - @Test - public void testSerialize() { - ReplicaProperties model = - new ReplicaProperties() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("hrixkwmy") - .withContainerId("ejvegrhbpnaixex") - .withReady(false) - .withStarted(true) - .withRestartCount(303838192), - new ReplicaContainer() - .withName("svfycxzbfv") - .withContainerId("wvrvmtg") - .withReady(true) - .withStarted(false) - .withRestartCount(213302833), - new ReplicaContainer() - .withName("xt") - .withContainerId("umh") - .withReady(false) - .withStarted(false) - .withRestartCount(401545193), - new ReplicaContainer() - .withName("lfktgplcrpwjxe") - .withContainerId("oi") - .withReady(false) - .withStarted(true) - .withRestartCount(509080980))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("hrixkwmy", model.containers().get(0).name()); - Assertions.assertEquals("ejvegrhbpnaixex", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(303838192, model.containers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java deleted file mode 100644 index a2f4ed6ce7286..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class RevisionCollectionTests { - @Test - public void testDeserialize() { - RevisionCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-01-15T08:47:59Z\",\"lastActiveTime\":\"2021-05-14T06:41:01Z\",\"fqdn\":\"jabibsystawf\",\"active\":true,\"replicas\":591359047,\"trafficWeight\":226758731,\"provisioningError\":\"jxbkzbzkdvn\",\"healthState\":\"Healthy\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"urgkakmokzhjjk\",\"name\":\"ffhmouwqlgzr\",\"type\":\"zeeyebi\"},{\"properties\":{\"createdTime\":\"2021-08-01T17:17:52Z\",\"lastActiveTime\":\"2021-02-02T12:35:30Z\",\"fqdn\":\"lbjbsyb\",\"active\":false,\"replicas\":146564330,\"trafficWeight\":1583288095,\"provisioningError\":\"mfpgv\",\"healthState\":\"None\",\"provisioningState\":\"Failed\"},\"id\":\"ltha\",\"name\":\"fxssm\",\"type\":\"u\"},{\"properties\":{\"createdTime\":\"2021-10-23T07:29:01Z\",\"lastActiveTime\":\"2021-01-02T11:55:22Z\",\"fqdn\":\"zpdrhneu\",\"active\":false,\"replicas\":150720980,\"trafficWeight\":2008248365,\"provisioningError\":\"i\",\"healthState\":\"None\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"gpikpzimejza\",\"name\":\"lfzxiavrmbzonoki\",\"type\":\"rjqc\"}],\"nextLink\":\"gzpfrla\"}") - .toObject(RevisionCollection.class); - } - - @Test - public void testSerialize() { - RevisionCollection model = - new RevisionCollection() - .withValue(Arrays.asList(new RevisionInner(), new RevisionInner(), new RevisionInner())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java deleted file mode 100644 index 60e7b11ae21e8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import org.junit.jupiter.api.Test; - -public final class RevisionInnerTests { - @Test - public void testDeserialize() { - RevisionInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-07-24T19:53:33Z\",\"lastActiveTime\":\"2021-05-24T12:41:33Z\",\"fqdn\":\"iin\",\"template\":{\"revisionSuffix\":\"wp\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":901371312,\"trafficWeight\":1612307116,\"provisioningError\":\"szfjvfbgofelja\",\"healthState\":\"None\",\"provisioningState\":\"Provisioned\"},\"id\":\"ldvriiiojnalghfk\",\"name\":\"tvsexsowuel\",\"type\":\"qhhahhxvrhmzkwpj\"}") - .toObject(RevisionInner.class); - } - - @Test - public void testSerialize() { - RevisionInner model = new RevisionInner(); - model = BinaryData.fromObject(model).toObject(RevisionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java deleted file mode 100644 index 71cfc9d363a4e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionProperties; -import org.junit.jupiter.api.Test; - -public final class RevisionPropertiesTests { - @Test - public void testDeserialize() { - RevisionProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-06-22T16:52:42Z\",\"lastActiveTime\":\"2021-08-18T23:10:34Z\",\"fqdn\":\"ghftqsxhqxujxuk\",\"template\":{\"revisionSuffix\":\"digrjguufzdmsyqt\",\"initContainers\":[{\"image\":\"hbotzingamvppho\",\"name\":\"qzudphq\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"ynwcvtbv\",\"name\":\"yhmtnvyqiat\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"wzcjaesgvvsccy\",\"name\":\"g\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"zlvdnkfxusemdw\",\"name\":\"muhapfcqdpsqxqv\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"elvezrypq\",\"name\":\"feo\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":137094818,\"maxReplicas\":1870547697,\"rules\":[]},\"volumes\":[{\"name\":\"dkow\",\"storageType\":\"AzureFile\",\"storageName\":\"pc\"}]},\"active\":false,\"replicas\":2091376747,\"trafficWeight\":2104767633,\"provisioningError\":\"njv\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\"}") - .toObject(RevisionProperties.class); - } - - @Test - public void testSerialize() { - RevisionProperties model = new RevisionProperties(); - model = BinaryData.fromObject(model).toObject(RevisionProperties.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java deleted file mode 100644 index fde8943776924..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleRuleAuthTests { - @Test - public void testDeserialize() { - ScaleRuleAuth model = - BinaryData - .fromString("{\"secretRef\":\"gdknnqv\",\"triggerParameter\":\"znqntoru\"}") - .toObject(ScaleRuleAuth.class); - Assertions.assertEquals("gdknnqv", model.secretRef()); - Assertions.assertEquals("znqntoru", model.triggerParameter()); - } - - @Test - public void testSerialize() { - ScaleRuleAuth model = new ScaleRuleAuth().withSecretRef("gdknnqv").withTriggerParameter("znqntoru"); - model = BinaryData.fromObject(model).toObject(ScaleRuleAuth.class); - Assertions.assertEquals("gdknnqv", model.secretRef()); - Assertions.assertEquals("znqntoru", model.triggerParameter()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java deleted file mode 100644 index ab65a2ea6cc8f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleRuleTests { - @Test - public void testDeserialize() { - ScaleRule model = - BinaryData - .fromString( - "{\"name\":\"ubeddg\",\"azureQueue\":{\"queueName\":\"fwqmzqalkrmn\",\"queueLength\":1174672424,\"auth\":[{\"secretRef\":\"cqqudf\",\"triggerParameter\":\"yxbaaabjyvayf\"},{\"secretRef\":\"m\",\"triggerParameter\":\"rtuzqogs\"},{\"secretRef\":\"nevfdnw\",\"triggerParameter\":\"mewzsyyc\"}]},\"custom\":{\"type\":\"soibjudpfrx\",\"metadata\":{\"ytdw\":\"hzv\",\"pdtii\":\"qbrqubpaxhexiili\",\"d\":\"q\",\"fxrxxle\":\"oaxoruzfgsqu\"},\"auth\":[{\"secretRef\":\"mxjezwlw\",\"triggerParameter\":\"xuqlcvydypat\"},{\"secretRef\":\"oa\",\"triggerParameter\":\"kniod\"},{\"secretRef\":\"oebwnujhemms\",\"triggerParameter\":\"dkcrodt\"}]},\"http\":{\"metadata\":{\"fltkacjv\":\"wj\"},\"auth\":[{\"secretRef\":\"lfoakg\",\"triggerParameter\":\"fpagaowpulp\"},{\"secretRef\":\"lyls\",\"triggerParameter\":\"k\"}]},\"tcp\":{\"metadata\":{\"xsdszuempsb\":\"jervtia\",\"v\":\"kfzbeyvpnqicvi\"},\"auth\":[{\"secretRef\":\"dxrbuukzcle\",\"triggerParameter\":\"hmlwpaztzpo\"},{\"secretRef\":\"cckwyfzqwhxxbu\",\"triggerParameter\":\"a\"},{\"secretRef\":\"feqztppriol\",\"triggerParameter\":\"rjaltolmncw\"}]}}") - .toObject(ScaleRule.class); - Assertions.assertEquals("ubeddg", model.name()); - Assertions.assertEquals("fwqmzqalkrmn", model.azureQueue().queueName()); - Assertions.assertEquals(1174672424, model.azureQueue().queueLength()); - Assertions.assertEquals("cqqudf", model.azureQueue().auth().get(0).secretRef()); - Assertions.assertEquals("yxbaaabjyvayf", model.azureQueue().auth().get(0).triggerParameter()); - Assertions.assertEquals("soibjudpfrx", model.custom().type()); - Assertions.assertEquals("hzv", model.custom().metadata().get("ytdw")); - Assertions.assertEquals("mxjezwlw", model.custom().auth().get(0).secretRef()); - Assertions.assertEquals("xuqlcvydypat", model.custom().auth().get(0).triggerParameter()); - Assertions.assertEquals("wj", model.http().metadata().get("fltkacjv")); - Assertions.assertEquals("lfoakg", model.http().auth().get(0).secretRef()); - Assertions.assertEquals("fpagaowpulp", model.http().auth().get(0).triggerParameter()); - Assertions.assertEquals("jervtia", model.tcp().metadata().get("xsdszuempsb")); - Assertions.assertEquals("dxrbuukzcle", model.tcp().auth().get(0).secretRef()); - Assertions.assertEquals("hmlwpaztzpo", model.tcp().auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - ScaleRule model = - new ScaleRule() - .withName("ubeddg") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("fwqmzqalkrmn") - .withQueueLength(1174672424) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("cqqudf").withTriggerParameter("yxbaaabjyvayf"), - new ScaleRuleAuth().withSecretRef("m").withTriggerParameter("rtuzqogs"), - new ScaleRuleAuth().withSecretRef("nevfdnw").withTriggerParameter("mewzsyyc")))) - .withCustom( - new CustomScaleRule() - .withType("soibjudpfrx") - .withMetadata( - mapOf("ytdw", "hzv", "pdtii", "qbrqubpaxhexiili", "d", "q", "fxrxxle", "oaxoruzfgsqu")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("mxjezwlw").withTriggerParameter("xuqlcvydypat"), - new ScaleRuleAuth().withSecretRef("oa").withTriggerParameter("kniod"), - new ScaleRuleAuth().withSecretRef("oebwnujhemms").withTriggerParameter("dkcrodt")))) - .withHttp( - new HttpScaleRule() - .withMetadata(mapOf("fltkacjv", "wj")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("lfoakg").withTriggerParameter("fpagaowpulp"), - new ScaleRuleAuth().withSecretRef("lyls").withTriggerParameter("k")))) - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("xsdszuempsb", "jervtia", "v", "kfzbeyvpnqicvi")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth() - .withSecretRef("dxrbuukzcle") - .withTriggerParameter("hmlwpaztzpo"), - new ScaleRuleAuth().withSecretRef("cckwyfzqwhxxbu").withTriggerParameter("a"), - new ScaleRuleAuth() - .withSecretRef("feqztppriol") - .withTriggerParameter("rjaltolmncw")))); - model = BinaryData.fromObject(model).toObject(ScaleRule.class); - Assertions.assertEquals("ubeddg", model.name()); - Assertions.assertEquals("fwqmzqalkrmn", model.azureQueue().queueName()); - Assertions.assertEquals(1174672424, model.azureQueue().queueLength()); - Assertions.assertEquals("cqqudf", model.azureQueue().auth().get(0).secretRef()); - Assertions.assertEquals("yxbaaabjyvayf", model.azureQueue().auth().get(0).triggerParameter()); - Assertions.assertEquals("soibjudpfrx", model.custom().type()); - Assertions.assertEquals("hzv", model.custom().metadata().get("ytdw")); - Assertions.assertEquals("mxjezwlw", model.custom().auth().get(0).secretRef()); - Assertions.assertEquals("xuqlcvydypat", model.custom().auth().get(0).triggerParameter()); - Assertions.assertEquals("wj", model.http().metadata().get("fltkacjv")); - Assertions.assertEquals("lfoakg", model.http().auth().get(0).secretRef()); - Assertions.assertEquals("fpagaowpulp", model.http().auth().get(0).triggerParameter()); - Assertions.assertEquals("jervtia", model.tcp().metadata().get("xsdszuempsb")); - Assertions.assertEquals("dxrbuukzcle", model.tcp().auth().get(0).secretRef()); - Assertions.assertEquals("hmlwpaztzpo", model.tcp().auth().get(0).triggerParameter()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java deleted file mode 100644 index 704b38964089e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleTests { - @Test - public void testDeserialize() { - Scale model = - BinaryData - .fromString( - "{\"minReplicas\":277220596,\"maxReplicas\":1475802306,\"rules\":[{\"name\":\"pxllrx\",\"azureQueue\":{\"queueName\":\"moadsuvarmy\",\"queueLength\":1450729079,\"auth\":[]},\"custom\":{\"type\":\"q\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}},{\"name\":\"yc\",\"azureQueue\":{\"queueName\":\"hp\",\"queueLength\":1622537719,\"auth\":[]},\"custom\":{\"type\":\"areqna\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}}]}") - .toObject(Scale.class); - Assertions.assertEquals(277220596, model.minReplicas()); - Assertions.assertEquals(1475802306, model.maxReplicas()); - Assertions.assertEquals("pxllrx", model.rules().get(0).name()); - Assertions.assertEquals("moadsuvarmy", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1450729079, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("q", model.rules().get(0).custom().type()); - } - - @Test - public void testSerialize() { - Scale model = - new Scale() - .withMinReplicas(277220596) - .withMaxReplicas(1475802306) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("pxllrx") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("moadsuvarmy") - .withQueueLength(1450729079) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule().withType("q").withMetadata(mapOf()).withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())), - new ScaleRule() - .withName("yc") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("hp") - .withQueueLength(1622537719) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule() - .withType("areqna") - .withMetadata(mapOf()) - .withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(Scale.class); - Assertions.assertEquals(277220596, model.minReplicas()); - Assertions.assertEquals(1475802306, model.maxReplicas()); - Assertions.assertEquals("pxllrx", model.rules().get(0).name()); - Assertions.assertEquals("moadsuvarmy", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1450729079, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("q", model.rules().get(0).custom().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java deleted file mode 100644 index f50d916afccb9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Secret; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SecretTests { - @Test - public void testDeserialize() { - Secret model = BinaryData.fromString("{\"name\":\"k\",\"value\":\"ali\"}").toObject(Secret.class); - Assertions.assertEquals("k", model.name()); - Assertions.assertEquals("ali", model.value()); - } - - @Test - public void testSerialize() { - Secret model = new Secret().withName("k").withValue("ali"); - model = BinaryData.fromObject(model).toObject(Secret.class); - Assertions.assertEquals("k", model.name()); - Assertions.assertEquals("ali", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java deleted file mode 100644 index 728c1021123f6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class SecretsCollectionInnerTests { - @Test - public void testDeserialize() { - SecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"racstwity\",\"value\":\"evxccedcp\"},{\"name\":\"dyodnwzxltj\",\"value\":\"nhltiugcxn\"},{\"name\":\"vwxqibyqunyo\",\"value\":\"wlmdjrkv\"},{\"name\":\"bvfvpdbod\",\"value\":\"izsjqlhkrr\"}]}") - .toObject(SecretsCollectionInner.class); - } - - @Test - public void testSerialize() { - SecretsCollectionInner model = - new SecretsCollectionInner() - .withValue( - Arrays - .asList( - new ContainerAppSecret(), - new ContainerAppSecret(), - new ContainerAppSecret(), - new ContainerAppSecret())); - model = BinaryData.fromObject(model).toObject(SecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java deleted file mode 100644 index ca43891e15c8f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.SourceControlCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SourceControlCollectionTests { - @Test - public void testDeserialize() { - SourceControlCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"mtggu\",\"branch\":\"ijr\"},\"id\":\"ivmmghfcfiwrxgk\",\"name\":\"euvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"},{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"q\",\"branch\":\"aqvlgafcqusr\"},\"id\":\"t\",\"name\":\"wsdtutnwl\",\"type\":\"uycvuzhyrmewip\"},{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"xukuqgsj\",\"branch\":\"undxgketw\"},\"id\":\"zjhfjmhvv\",\"name\":\"uvgp\",\"type\":\"uneqsxvmhf\"},{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"ihsasb\",\"branch\":\"dyp\"},\"id\":\"uemsly\",\"name\":\"sqy\",\"type\":\"pfoobr\"}],\"nextLink\":\"tyms\"}") - .toObject(SourceControlCollection.class); - Assertions.assertEquals("mtggu", model.value().get(0).repoUrl()); - Assertions.assertEquals("ijr", model.value().get(0).branch()); - } - - @Test - public void testSerialize() { - SourceControlCollection model = - new SourceControlCollection() - .withValue( - Arrays - .asList( - new SourceControlInner().withRepoUrl("mtggu").withBranch("ijr"), - new SourceControlInner().withRepoUrl("q").withBranch("aqvlgafcqusr"), - new SourceControlInner().withRepoUrl("xukuqgsj").withBranch("undxgketw"), - new SourceControlInner().withRepoUrl("ihsasb").withBranch("dyp"))); - model = BinaryData.fromObject(model).toObject(SourceControlCollection.class); - Assertions.assertEquals("mtggu", model.value().get(0).repoUrl()); - Assertions.assertEquals("ijr", model.value().get(0).branch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java deleted file mode 100644 index dfd718e91ff0c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SourceControlInnerTests { - @Test - public void testDeserialize() { - SourceControlInner model = - BinaryData - .fromString( - "{\"properties\":{\"operationState\":\"Failed\",\"repoUrl\":\"dnfwqzdzg\",\"branch\":\"la\",\"githubActionConfiguration\":{\"contextPath\":\"qlyvijo\",\"image\":\"iv\",\"publishType\":\"oyzunbixxr\",\"os\":\"kvcpwpgclr\",\"runtimeStack\":\"vtsoxf\",\"runtimeVersion\":\"enxpmyyefr\"}},\"id\":\"pdnqqskawaoqvmmb\",\"name\":\"pqfrtqlkz\",\"type\":\"egnitg\"}") - .toObject(SourceControlInner.class); - Assertions.assertEquals("dnfwqzdzg", model.repoUrl()); - Assertions.assertEquals("la", model.branch()); - Assertions.assertEquals("qlyvijo", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("iv", model.githubActionConfiguration().image()); - Assertions.assertEquals("oyzunbixxr", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("kvcpwpgclr", model.githubActionConfiguration().os()); - Assertions.assertEquals("vtsoxf", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("enxpmyyefr", model.githubActionConfiguration().runtimeVersion()); - } - - @Test - public void testSerialize() { - SourceControlInner model = - new SourceControlInner() - .withRepoUrl("dnfwqzdzg") - .withBranch("la") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("qlyvijo") - .withImage("iv") - .withPublishType("oyzunbixxr") - .withOs("kvcpwpgclr") - .withRuntimeStack("vtsoxf") - .withRuntimeVersion("enxpmyyefr")); - model = BinaryData.fromObject(model).toObject(SourceControlInner.class); - Assertions.assertEquals("dnfwqzdzg", model.repoUrl()); - Assertions.assertEquals("la", model.branch()); - Assertions.assertEquals("qlyvijo", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("iv", model.githubActionConfiguration().image()); - Assertions.assertEquals("oyzunbixxr", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("kvcpwpgclr", model.githubActionConfiguration().os()); - Assertions.assertEquals("vtsoxf", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("enxpmyyefr", model.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java deleted file mode 100644 index d62489c363d6a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TcpScaleRuleTests { - @Test - public void testDeserialize() { - TcpScaleRule model = - BinaryData - .fromString( - "{\"metadata\":{\"twaenuuzko\":\"ufgmjzrwrdg\",\"iefozbhdmsml\":\"bminrfdwoyuhhzi\"},\"auth\":[{\"secretRef\":\"oftrmaequia\",\"triggerParameter\":\"icslfaoq\"},{\"secretRef\":\"iyylhalnswhccsp\",\"triggerParameter\":\"aivwitqscywu\"},{\"secretRef\":\"woluhczbwemhair\",\"triggerParameter\":\"rgzdwmsweyp\"},{\"secretRef\":\"dxggicccnxqhuexm\",\"triggerParameter\":\"tlstvlzywem\"}]}") - .toObject(TcpScaleRule.class); - Assertions.assertEquals("ufgmjzrwrdg", model.metadata().get("twaenuuzko")); - Assertions.assertEquals("oftrmaequia", model.auth().get(0).secretRef()); - Assertions.assertEquals("icslfaoq", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - TcpScaleRule model = - new TcpScaleRule() - .withMetadata(mapOf("twaenuuzko", "ufgmjzrwrdg", "iefozbhdmsml", "bminrfdwoyuhhzi")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("oftrmaequia").withTriggerParameter("icslfaoq"), - new ScaleRuleAuth().withSecretRef("iyylhalnswhccsp").withTriggerParameter("aivwitqscywu"), - new ScaleRuleAuth().withSecretRef("woluhczbwemhair").withTriggerParameter("rgzdwmsweyp"), - new ScaleRuleAuth().withSecretRef("dxggicccnxqhuexm").withTriggerParameter("tlstvlzywem"))); - model = BinaryData.fromObject(model).toObject(TcpScaleRule.class); - Assertions.assertEquals("ufgmjzrwrdg", model.metadata().get("twaenuuzko")); - Assertions.assertEquals("oftrmaequia", model.auth().get(0).secretRef()); - Assertions.assertEquals("icslfaoq", model.auth().get(0).triggerParameter()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java deleted file mode 100644 index 4343123445bd2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.Volume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TemplateTests { - @Test - public void testDeserialize() { - Template model = - BinaryData - .fromString( - "{\"revisionSuffix\":\"mcqibycnojv\",\"initContainers\":[{\"image\":\"fqsgzvahapjy\",\"name\":\"pvgqzcjrvxdjzlm\",\"command\":[\"kvugfhzovawjvzun\",\"uthnnprnxipeilpj\",\"uaejxdultsk\"],\"args\":[\"tdzumveekgpw\",\"zuhkfpbsjyof\",\"xl\"],\"env\":[],\"resources\":{\"cpu\":63.45978205100479,\"memory\":\"waboe\",\"ephemeralStorage\":\"v\"},\"volumeMounts\":[]},{\"image\":\"smv\",\"name\":\"wyjsflhhcaalnjix\",\"command\":[\"yaw\",\"oyaqcslyjpkiid\"],\"args\":[\"xznelixhnrztf\",\"lhbnxkna\",\"aulppggd\"],\"env\":[],\"resources\":{\"cpu\":62.44640700433306,\"memory\":\"ropuhpigv\",\"ephemeralStorage\":\"ylgqgitxmedjvcsl\"},\"volumeMounts\":[]},{\"image\":\"wncwzzhxgktrmg\",\"name\":\"napkteoellw\",\"command\":[\"d\",\"gpfqbuace\",\"pzfqrhhuaoppp\",\"qeqxo\"],\"args\":[\"ahzxctobgbk\",\"moizpos\",\"mgrcfbu\"],\"env\":[],\"resources\":{\"cpu\":39.820918987867984,\"memory\":\"kxbpvj\",\"ephemeralStorage\":\"jhxxjyn\"},\"volumeMounts\":[]},{\"image\":\"vkr\",\"name\":\"wbxqzvszjfau\",\"command\":[\"dxxiv\",\"tvtc\",\"aqtdoqmcbx\",\"wvxysl\"],\"args\":[\"sfxobl\",\"tkblmpewww\",\"bkrvrnsvshqj\"],\"env\":[],\"resources\":{\"cpu\":26.217415829732616,\"memory\":\"ovasrruvwbhsqfsu\",\"ephemeralStorage\":\"gjb\"},\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"rfbjf\",\"name\":\"w\",\"command\":[\"t\",\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"],\"args\":[\"ytjrybnwjewgdr\",\"ervnaenqpehi\",\"doy\",\"mifthnzdnd\"],\"env\":[],\"resources\":{\"cpu\":9.874823960807245,\"memory\":\"gynduha\",\"ephemeralStorage\":\"qlkth\"},\"volumeMounts\":[]},{\"probes\":[],\"image\":\"bgycduiertgccym\",\"name\":\"olpsslqlf\",\"command\":[\"n\",\"bglzpswi\",\"d\"],\"args\":[\"yhz\",\"xssadbzmnvdf\"],\"env\":[],\"resources\":{\"cpu\":6.678154863771269,\"memory\":\"xzb\",\"ephemeralStorage\":\"blylpstdbh\"},\"volumeMounts\":[]},{\"probes\":[],\"image\":\"zucerscdntnev\",\"name\":\"wjmy\",\"command\":[\"sslswtmweriof\",\"pyqs\"],\"args\":[\"abnetshh\"],\"env\":[],\"resources\":{\"cpu\":83.1289050402311,\"memory\":\"wiwubm\",\"ephemeralStorage\":\"besldnkwwtppjflc\"},\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":97204853,\"maxReplicas\":244687825,\"rules\":[{\"name\":\"sikvmkqzeqqkdlt\"}]},\"volumes\":[{\"name\":\"gureodkwobdag\",\"storageType\":\"EmptyDir\",\"storageName\":\"qdxbxwa\"}]}") - .toObject(Template.class); - Assertions.assertEquals("mcqibycnojv", model.revisionSuffix()); - Assertions.assertEquals("fqsgzvahapjy", model.initContainers().get(0).image()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.initContainers().get(0).name()); - Assertions.assertEquals("kvugfhzovawjvzun", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("tdzumveekgpw", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(63.45978205100479D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("waboe", model.initContainers().get(0).resources().memory()); - Assertions.assertEquals("rfbjf", model.containers().get(0).image()); - Assertions.assertEquals("w", model.containers().get(0).name()); - Assertions.assertEquals("t", model.containers().get(0).command().get(0)); - Assertions.assertEquals("ytjrybnwjewgdr", model.containers().get(0).args().get(0)); - Assertions.assertEquals(9.874823960807245D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("gynduha", model.containers().get(0).resources().memory()); - Assertions.assertEquals(97204853, model.scale().minReplicas()); - Assertions.assertEquals(244687825, model.scale().maxReplicas()); - Assertions.assertEquals("sikvmkqzeqqkdlt", model.scale().rules().get(0).name()); - Assertions.assertEquals("gureodkwobdag", model.volumes().get(0).name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.volumes().get(0).storageType()); - Assertions.assertEquals("qdxbxwa", model.volumes().get(0).storageName()); - } - - @Test - public void testSerialize() { - Template model = - new Template() - .withRevisionSuffix("mcqibycnojv") - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("fqsgzvahapjy") - .withName("pvgqzcjrvxdjzlm") - .withCommand(Arrays.asList("kvugfhzovawjvzun", "uthnnprnxipeilpj", "uaejxdultsk")) - .withArgs(Arrays.asList("tdzumveekgpw", "zuhkfpbsjyof", "xl")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(63.45978205100479D).withMemory("waboe")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("smv") - .withName("wyjsflhhcaalnjix") - .withCommand(Arrays.asList("yaw", "oyaqcslyjpkiid")) - .withArgs(Arrays.asList("xznelixhnrztf", "lhbnxkna", "aulppggd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(62.44640700433306D).withMemory("ropuhpigv")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("wncwzzhxgktrmg") - .withName("napkteoellw") - .withCommand(Arrays.asList("d", "gpfqbuace", "pzfqrhhuaoppp", "qeqxo")) - .withArgs(Arrays.asList("ahzxctobgbk", "moizpos", "mgrcfbu")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(39.820918987867984D).withMemory("kxbpvj")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("vkr") - .withName("wbxqzvszjfau") - .withCommand(Arrays.asList("dxxiv", "tvtc", "aqtdoqmcbx", "wvxysl")) - .withArgs(Arrays.asList("sfxobl", "tkblmpewww", "bkrvrnsvshqj")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources() - .withCpu(26.217415829732616D) - .withMemory("ovasrruvwbhsqfsu")) - .withVolumeMounts(Arrays.asList()))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("rfbjf") - .withName("w") - .withCommand(Arrays.asList("t", "tpvjzbexilzznfqq", "vwpm", "taruoujmkcj")) - .withArgs(Arrays.asList("ytjrybnwjewgdr", "ervnaenqpehi", "doy", "mifthnzdnd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(9.874823960807245D).withMemory("gynduha")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("bgycduiertgccym") - .withName("olpsslqlf") - .withCommand(Arrays.asList("n", "bglzpswi", "d")) - .withArgs(Arrays.asList("yhz", "xssadbzmnvdf")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(6.678154863771269D).withMemory("xzb")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("zucerscdntnev") - .withName("wjmy") - .withCommand(Arrays.asList("sslswtmweriof", "pyqs")) - .withArgs(Arrays.asList("abnetshh")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(83.1289050402311D).withMemory("wiwubm")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()))) - .withScale( - new Scale() - .withMinReplicas(97204853) - .withMaxReplicas(244687825) - .withRules(Arrays.asList(new ScaleRule().withName("sikvmkqzeqqkdlt")))) - .withVolumes( - Arrays - .asList( - new Volume() - .withName("gureodkwobdag") - .withStorageType(StorageType.EMPTY_DIR) - .withStorageName("qdxbxwa"))); - model = BinaryData.fromObject(model).toObject(Template.class); - Assertions.assertEquals("mcqibycnojv", model.revisionSuffix()); - Assertions.assertEquals("fqsgzvahapjy", model.initContainers().get(0).image()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.initContainers().get(0).name()); - Assertions.assertEquals("kvugfhzovawjvzun", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("tdzumveekgpw", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(63.45978205100479D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("waboe", model.initContainers().get(0).resources().memory()); - Assertions.assertEquals("rfbjf", model.containers().get(0).image()); - Assertions.assertEquals("w", model.containers().get(0).name()); - Assertions.assertEquals("t", model.containers().get(0).command().get(0)); - Assertions.assertEquals("ytjrybnwjewgdr", model.containers().get(0).args().get(0)); - Assertions.assertEquals(9.874823960807245D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("gynduha", model.containers().get(0).resources().memory()); - Assertions.assertEquals(97204853, model.scale().minReplicas()); - Assertions.assertEquals(244687825, model.scale().maxReplicas()); - Assertions.assertEquals("sikvmkqzeqqkdlt", model.scale().rules().get(0).name()); - Assertions.assertEquals("gureodkwobdag", model.volumes().get(0).name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.volumes().get(0).storageType()); - Assertions.assertEquals("qdxbxwa", model.volumes().get(0).storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java deleted file mode 100644 index 49d809a3ba2fb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TrafficWeightTests { - @Test - public void testDeserialize() { - TrafficWeight model = - BinaryData - .fromString( - "{\"revisionName\":\"nbmpowuwprzq\",\"weight\":706936275,\"latestRevision\":false,\"label\":\"upjm\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("nbmpowuwprzq", model.revisionName()); - Assertions.assertEquals(706936275, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("upjm", model.label()); - } - - @Test - public void testSerialize() { - TrafficWeight model = - new TrafficWeight() - .withRevisionName("nbmpowuwprzq") - .withWeight(706936275) - .withLatestRevision(false) - .withLabel("upjm"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("nbmpowuwprzq", model.revisionName()); - Assertions.assertEquals(706936275, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("upjm", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 1633158b2f51d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentityTests { - @Test - public void testDeserialize() { - UserAssignedIdentity model = BinaryData.fromString("{}").toObject(UserAssignedIdentity.class); - } - - @Test - public void testSerialize() { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java deleted file mode 100644 index 7da57ae8a6d66..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VnetConfigurationTests { - @Test - public void testDeserialize() { - VnetConfiguration model = - BinaryData - .fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"er\",\"runtimeSubnetId\":\"pqbmfpjbab\",\"dockerBridgeCidr\":\"dfc\",\"platformReservedCidr\":\"spuunnoxyhkxgq\",\"platformReservedDnsIP\":\"rihpfhoq\",\"outboundSettings\":{\"outBoundType\":\"LoadBalancer\",\"virtualNetworkApplianceIp\":\"dao\"}}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("er", model.infrastructureSubnetId()); - Assertions.assertEquals("pqbmfpjbab", model.runtimeSubnetId()); - Assertions.assertEquals("dfc", model.dockerBridgeCidr()); - Assertions.assertEquals("spuunnoxyhkxgq", model.platformReservedCidr()); - Assertions.assertEquals("rihpfhoq", model.platformReservedDnsIp()); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.LOAD_BALANCER, model.outboundSettings().outBoundType()); - Assertions.assertEquals("dao", model.outboundSettings().virtualNetworkApplianceIp()); - } - - @Test - public void testSerialize() { - VnetConfiguration model = - new VnetConfiguration() - .withInternal(true) - .withInfrastructureSubnetId("er") - .withRuntimeSubnetId("pqbmfpjbab") - .withDockerBridgeCidr("dfc") - .withPlatformReservedCidr("spuunnoxyhkxgq") - .withPlatformReservedDnsIp("rihpfhoq") - .withOutboundSettings( - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.LOAD_BALANCER) - .withVirtualNetworkApplianceIp("dao")); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("er", model.infrastructureSubnetId()); - Assertions.assertEquals("pqbmfpjbab", model.runtimeSubnetId()); - Assertions.assertEquals("dfc", model.dockerBridgeCidr()); - Assertions.assertEquals("spuunnoxyhkxgq", model.platformReservedCidr()); - Assertions.assertEquals("rihpfhoq", model.platformReservedDnsIp()); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.LOAD_BALANCER, model.outboundSettings().outBoundType()); - Assertions.assertEquals("dao", model.outboundSettings().virtualNetworkApplianceIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java deleted file mode 100644 index eb336740d6195..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VolumeMountTests { - @Test - public void testDeserialize() { - VolumeMount model = - BinaryData - .fromString("{\"volumeName\":\"btkuwhh\",\"mountPath\":\"ykojoxafnndlpic\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("btkuwhh", model.volumeName()); - Assertions.assertEquals("ykojoxafnndlpic", model.mountPath()); - } - - @Test - public void testSerialize() { - VolumeMount model = new VolumeMount().withVolumeName("btkuwhh").withMountPath("ykojoxafnndlpic"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("btkuwhh", model.volumeName()); - Assertions.assertEquals("ykojoxafnndlpic", model.mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java deleted file mode 100644 index c384f073f8b2f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Volume; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VolumeTests { - @Test - public void testDeserialize() { - Volume model = - BinaryData - .fromString("{\"name\":\"rncsdtclu\",\"storageType\":\"EmptyDir\",\"storageName\":\"bsfgytguslfea\"}") - .toObject(Volume.class); - Assertions.assertEquals("rncsdtclu", model.name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.storageType()); - Assertions.assertEquals("bsfgytguslfea", model.storageName()); - } - - @Test - public void testSerialize() { - Volume model = - new Volume().withName("rncsdtclu").withStorageType(StorageType.EMPTY_DIR).withStorageName("bsfgytguslfea"); - model = BinaryData.fromObject(model).toObject(Volume.class); - Assertions.assertEquals("rncsdtclu", model.name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.storageType()); - Assertions.assertEquals("bsfgytguslfea", model.storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java deleted file mode 100644 index dd61687caefa1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesCollectionTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":1215063805,\"maximumCount\":1612515115,\"currentCount\":75239046},\"id\":\"metttwgd\",\"name\":\"lqxihhrmooiz\",\"type\":\"seypxiutcxapz\"}],\"nextLink\":\"rpetogebjoxsl\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1215063805, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1612515115, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(75239046, model.value().get(0).properties().currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesCollection model = - new WorkloadProfileStatesCollection() - .withValue( - Arrays - .asList( - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1215063805) - .withMaximumCount(1612515115) - .withCurrentCount(75239046)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1215063805, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1612515115, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(75239046, model.value().get(0).properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java deleted file mode 100644 index 6ae23c1eb328f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesInnerTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesInner model = - BinaryData - .fromString( - "{\"properties\":{\"minimumCount\":1522179907,\"maximumCount\":255034362,\"currentCount\":1064191938},\"id\":\"nk\",\"name\":\"zjcjbtr\",\"type\":\"aehvvibrxjjstoq\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1522179907, model.properties().minimumCount()); - Assertions.assertEquals(255034362, model.properties().maximumCount()); - Assertions.assertEquals(1064191938, model.properties().currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesInner model = - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1522179907) - .withMaximumCount(255034362) - .withCurrentCount(1064191938)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1522179907, model.properties().minimumCount()); - Assertions.assertEquals(255034362, model.properties().maximumCount()); - Assertions.assertEquals(1064191938, model.properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java deleted file mode 100644 index 7fe7ba5a869bf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesPropertiesTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesProperties model = - BinaryData - .fromString("{\"minimumCount\":449265761,\"maximumCount\":774286462,\"currentCount\":1086468364}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(449265761, model.minimumCount()); - Assertions.assertEquals(774286462, model.maximumCount()); - Assertions.assertEquals(1086468364, model.currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesProperties model = - new WorkloadProfileStatesProperties() - .withMinimumCount(449265761) - .withMaximumCount(774286462) - .withCurrentCount(1086468364); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(449265761, model.minimumCount()); - Assertions.assertEquals(774286462, model.maximumCount()); - Assertions.assertEquals(1086468364, model.currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java deleted file mode 100644 index 83588dd997c49..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileTests { - @Test - public void testDeserialize() { - WorkloadProfile model = - BinaryData - .fromString( - "{\"workloadProfileType\":\"wzjbh\",\"minimumCount\":1608749608,\"maximumCount\":1253939074}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("wzjbh", model.workloadProfileType()); - Assertions.assertEquals(1608749608, model.minimumCount()); - Assertions.assertEquals(1253939074, model.maximumCount()); - } - - @Test - public void testSerialize() { - WorkloadProfile model = - new WorkloadProfile() - .withWorkloadProfileType("wzjbh") - .withMinimumCount(1608749608) - .withMaximumCount(1253939074); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("wzjbh", model.workloadProfileType()); - Assertions.assertEquals(1608749608, model.minimumCount()); - Assertions.assertEquals(1253939074, model.maximumCount()); - } -}