diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 9996bed8c3eb8..45ab1275ecc11 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md @@ -1,14 +1,801 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2024-10-22) -### Features Added +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.DaprComponent$DefinitionStages` was modified + +* `withExistingConnectedEnvironment(java.lang.String,java.lang.String)` was removed in stage 1 + +#### `models.ContainerAppsSourceControls` was modified + +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.ConnectedEnvironmentsDaprComponents` was modified + +* `models.DaprComponent get(java.lang.String,java.lang.String,java.lang.String)` -> `models.ConnectedEnvironmentDaprComponent get(java.lang.String,java.lang.String,java.lang.String)` +* `models.DaprComponent$DefinitionStages$Blank define(java.lang.String)` -> `models.ConnectedEnvironmentDaprComponent$DefinitionStages$Blank define(java.lang.String)` +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `models.DaprComponent getById(java.lang.String)` -> `models.ConnectedEnvironmentDaprComponent getById(java.lang.String)` +* `com.azure.core.http.rest.Response deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` + +#### `models.ConnectedEnvironmentsCertificates` was modified + +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `com.azure.core.http.rest.Response deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` + +#### `models.DaprComponents` was modified + +* `createOrUpdateWithResponse(java.lang.String,java.lang.String,java.lang.String,fluent.models.DaprComponentInner,com.azure.core.util.Context)` was removed +* `createOrUpdate(java.lang.String,java.lang.String,java.lang.String,fluent.models.DaprComponentInner)` was removed + +#### `models.DaprComponent$Definition` was modified + +* `withExistingConnectedEnvironment(java.lang.String,java.lang.String)` was removed + +#### `models.ConnectedEnvironmentsStorages` was modified + +* `com.azure.core.http.rest.Response deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +### Features Added + +* `models.SessionContainer` was added + +* `models.ContainerAppsBuilds` was added + +* `models.HttpConnectionPool` was added + +* `models.SessionPoolUpdatableProperties` was added + +* `models.LoggerSetting` was added + +* `models.ScaleConfiguration` was added + +* `models.RuntimeJavaAgentLogging` was added + +* `models.LabelHistoryRecordItem` was added + +* `models.BuildProvisioningState` was added + +* `models.DaprSubscriptions` was added + +* `models.PatchType` was added + +* `models.HttpRouteConfigProperties` was added + +* `models.SmbStorage` was added + +* `models.CertificateKeyVaultProperties` was added + +* `models.EnvironmentVariable` was added + +* `models.DotNetComponentServiceBind` was added + +* `models.AppResiliencies` was added + +* `models.PrivateEndpoint` was added + +* `models.JavaComponentServiceBind` was added + +* `models.LogsConfiguration` was added + +* `models.PatchApplyStatus` was added + +* `models.DaprSubscription$UpdateStages` was added + +* `models.ConnectedEnvironmentDaprComponent` was added + +* `models.DotNetComponent$DefinitionStages` was added + +* `models.HttpGet` was added + +* `models.ContainerAppsPatches` was added + +* `models.LogicApps` was added + +* `models.PrivateEndpointConnection$Definition` was added + +* `models.SessionPool$UpdateStages` was added + +* `models.MaintenanceConfigurationResource` was added + +* `models.DotNetComponentProvisioningState` was added + +* `models.DotNetComponentType` was added + +* `models.FunctionsExtensions` was added + +* `models.DaprComponentResiliencyPoliciesCollection` was added + +* `models.ConnectedEnvironmentDaprComponent$DefinitionStages` was added + +* `models.PatchCollection` was added + +* `models.AppResiliency$Definition` was added + +* `models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration` was added + +* `models.HttpRouteConfigs` was added + +* `models.ContainerAppsPatchResource` was added + +* `models.DaprSubscription$DefinitionStages` was added + +* `models.OtlpConfiguration` was added + +* `models.MetricsConfiguration` was added + +* `models.ScgRoute` was added + +* `models.MaintenanceConfigurationResource$UpdateStages` was added + +* `models.DaprSubscriptionBulkSubscribeOptions` was added + +* `models.JavaComponent$Definition` was added + +* `models.PrivateEndpointServiceConnectionStatus` was added + +* `models.LabelHistoryCollection` was added + +* `models.SessionIngress` was added + +* `models.BuildsByBuilderResources` was added + +* `models.BuildResource` was added + +* `models.ContainerAppsBuildConfiguration` was added + +* `models.WorkflowEnvelopeCollection` was added + +* `models.TimeoutPolicy` was added + +* `models.DotNetComponentConfigurationProperty` was added + +* `models.ContainerAppsBuildCollection` was added + +* `models.DaprSubscriptionsCollection` was added + +* `models.ErrorEntity` was added + +* `models.PrivateLinkServiceConnectionState` was added + +* `models.DaprSubscriptionRoutes` was added + +* `models.PatchProperties` was added + +* `models.HttpRetryPolicy` was added + +* `models.PatchDetails` was added + +* `models.PrivateEndpointConnectionProvisioningState` was added + +* `models.CircuitBreakerPolicy` was added + +* `models.TcpRetryPolicy` was added + +* `models.SessionPoolSecret` was added + +* `models.HeaderMatch` was added + +* `models.BuilderCollection` was added + +* `models.BuildStatus` was added + +* `models.DaprSubscription` was added + +* `models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration` was added + +* `models.BuildToken` was added + +* `models.DaprComponentResiliencyPolicyConfiguration` was added + +* `models.WorkflowEnvelope` was added + +* `models.OpenTelemetryConfiguration` was added + +* `models.PrivateLinkResourceListResult` was added + +* `models.DaprComponentResiliencyPolicy$Update` was added + +* `models.LogicAppsProxyMethod` was added + +* `models.HttpRouteAction` was added + +* `models.ConnectedEnvironmentDaprComponentsCollection` was added + +* `models.DestinationsConfiguration` was added + +* `models.CertificateType` was added + +* `models.ConnectedEnvironmentDaprComponentProperties` was added + +* `models.BuildCollection` was added + +* `models.ScheduledEntry` was added + +* `models.ExecutionType` was added + +* `models.ManagedIdentitySetting` was added + +* `models.ContainerExecutionStatus` was added + +* `models.DaprComponentServiceBinding` was added + +* `models.MaintenanceConfigurationCollection` was added + +* `models.ContainerAppsBuildsByContainerApps` was added + +* `models.CustomContainerTemplate` was added + +* `models.WorkflowArtifacts` was added + +* `models.LabelHistoryProperties` was added + +* `models.SessionNetworkConfiguration` was added + +* `models.PatchingMode` was added + +* `models.ContainerAppsBuildResource` was added + +* `models.PrivateEndpointConnection$UpdateStages` was added + +* `models.JavaComponent$DefinitionStages` was added + +* `models.ConnectedEnvironmentDaprComponent$UpdateStages` was added + +* `models.HttpRouteProvisioningState` was added + +* `models.ManagedServiceIdentityAutoGenerated` was added + +* `models.ExecutionStatus` was added + +* `models.ConnectedEnvironmentDaprComponent$Definition` was added + +* `models.ContainerRegistryWithCustomImage` was added + +* `models.JavaComponentType` was added + +* `models.RuntimeDotnet` was added + +* `models.AppResiliency$UpdateStages` was added + +* `models.SpringCloudGatewayComponent` was added + +* `models.ConnectedEnvironmentDaprComponentProvisioningState` was added + +* `models.Kind` was added + +* `models.ContainerAppsSessionPools` was added + +* `models.ContainerAppPropertiesPatchingConfiguration` was added + +* `models.BuilderResource$Definition` was added + +* `models.Header` was added + +* `models.TcpConnectionPool` was added + +* `models.JavaComponents` was added + +* `models.DaprSubscription$Definition` was added + +* `models.BuilderProvisioningState` was added + +* `models.DotNetComponent$UpdateStages` was added + +* `models.LabelHistory` was added + +* `models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration` was added + +* `models.LogicApp$Definition` was added + +* `models.HttpRouteProvisioningErrors` was added -### Other Changes +* `models.Runtime` was added + +* `models.JavaComponentPropertiesScale` was added + +* `models.BuildResource$UpdateStages` was added + +* `models.ManagedEnvironmentPrivateEndpointConnections` was added + +* `models.DotNetComponents` was added + +* `models.WorkflowState` was added + +* `models.PrivateEndpointConnectionListResult` was added + +* `models.AppResiliency` was added + +* `models.BuilderResource$Update` was added + +* `models.BuildConfiguration` was added + +* `models.PoolManagementType` was added + +* `models.BuildResource$Update` was added + +* `models.IdentitySettingsLifeCycle` was added + +* `models.HttpRouteConfig$Definition` was added + +* `models.SessionPoolProvisioningState` was added + +* `models.SpringBootAdminComponent` was added + +* `models.PatchDetailsOldLayer` was added + +* `models.ConnectedEnvironmentDaprComponent$Update` was added + +* `models.DotNetComponent$Update` was added + +* `models.JavaComponentConfigurationProperty` was added + +* `models.HttpRouteConfig$DefinitionStages` was added + +* `models.SpringCloudConfigComponent` was added + +* `models.ConnectedEnvironmentStorageProvisioningState` was added + +* `models.MaintenanceConfigurations` was added + +* `models.PrivateEndpointConnection` was added + +* `models.BuilderResourceUpdate` was added + +* `models.SessionPool$Definition` was added + +* `models.AppResiliency$DefinitionStages` was added + +* `models.ImageType` was added + +* `models.BuildAuthTokens` was added + +* `models.ContainerRegistry` was added + +* `models.IngressTargetPortHttpScheme` was added + +* `models.WorkflowEnvelopeProperties` was added + +* `models.WorkflowHealthState` was added + +* `models.HttpRouteConfig` was added + +* `models.DaprServiceBindMetadata` was added + +* `models.MaintenanceConfigurationResource$DefinitionStages` was added + +* `models.TracesConfiguration` was added + +* `models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration` was added + +* `models.SessionPool$DefinitionStages` was added + +* `models.PrivateEndpointConnection$Update` was added + +* `models.LogicApp$UpdateStages` was added + +* `models.MaintenanceConfigurationResource$Update` was added + +* `models.AppInsightsConfiguration` was added + +* `models.WorkflowHealth` was added + +* `models.DaprComponentResiliencyPolicy$Definition` was added + +* `models.SessionPool` was added + +* `models.NfsAzureFileProperties` was added + +* `models.PrivateLinkResource` was added + +* `models.DaprComponentResiliencyPolicy$DefinitionStages` was added + +* `models.SessionContainerResources` was added + +* `models.PatchSkipConfig` was added + +* `models.HttpRouteConfig$Update` was added + +* `models.DaprComponentResiliencyPolicies` was added + +* `models.AppResiliencyCollection` was added + +* `models.DotNetComponent` was added + +* `models.ContainerAppsLabelHistories` was added + +* `models.SessionPool$Update` was added + +* `models.HttpRouteMatch` was added + +* `models.BuilderResource$DefinitionStages` was added + +* `models.JavaComponentsCollection` was added + +* `models.Builders` was added + +* `models.Level` was added + +* `models.BuildResource$DefinitionStages` was added + +* `models.JavaComponent` was added + +* `models.AppResiliency$Update` was added + +* `models.SessionNetworkStatus` was added + +* `models.DaprSubscription$Update` was added + +* `models.WeekDay` was added + +* `models.DataDogConfiguration` was added + +* `models.DotNetComponentsCollection` was added + +* `models.ManagedEnvironmentPrivateLinkResources` was added + +* `models.RuntimeJava` was added + +* `models.MaintenanceConfigurationResource$Definition` was added + +* `models.DotNetComponent$Definition` was added + +* `models.HttpRouteConfig$UpdateStages` was added + +* `models.DaprComponentResiliencyPolicy$UpdateStages` was added + +* `models.JavaComponent$UpdateStages` was added + +* `models.LogicApp` was added + +* `models.JavaComponentProvisioningState` was added + +* `models.PatchDetailsNewLayer` was added + +* `models.HttpRouteConfigCollection` was added + +* `models.DetectionStatus` was added + +* `models.ReplicaExecutionStatus` was added + +* `models.PreBuildStep` was added + +* `models.BuilderResource$UpdateStages` was added + +* `models.RuntimeJavaAgent` was added + +* `models.DynamicPoolConfiguration` was added + +* `models.IdentitySettings` was added + +* `models.HttpRouteTarget` was added + +* `models.DaprComponentResiliencyPolicy` was added + +* `models.JobRunningState` was added + +* `models.ContainerType` was added + +* `models.SessionRegistryCredentials` was added + +* `models.HttpRouteRule` was added + +* `models.JavaComponentProperties` was added + +* `models.BuilderResource` was added + +* `models.BuildResource$Definition` was added + +* `models.Builds` was added + +* `models.SessionPoolCollection` was added + +* `models.HttpRoute` was added + +* `models.LogicApp$Update` was added + +* `models.NacosComponent` was added + +* `models.LogicApp$DefinitionStages` was added + +* `models.JavaComponent$Update` was added + +* `models.JavaComponentIngress` was added + +* `models.PublicNetworkAccess` was added + +* `models.DaprSubscriptionRouteRule` was added + +* `models.PrivateEndpointConnection$DefinitionStages` was added + +* `models.SpringCloudEurekaComponent` was added + +#### `models.ContainerAppsSourceControls` was modified + +* `deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.Boolean,java.lang.Boolean,com.azure.core.util.Context)` was added +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,java.lang.Boolean,com.azure.core.util.Context)` was added + +#### `models.ServiceBind` was modified + +* `clientType()` was added +* `customizedKeys()` was added +* `withClientType(java.lang.String)` was added +* `withCustomizedKeys(java.util.Map)` was added + +#### `models.Job` was modified + +* `runningState()` was added +* `suspend()` was added +* `suspend(com.azure.core.util.Context)` was added +* `extendedLocation()` was added +* `resume()` was added +* `resume(com.azure.core.util.Context)` was added + +#### `models.Revision` was modified + +* `labels()` was added + +#### `models.WorkloadProfile` was modified + +* `enableFips()` was added +* `withEnableFips(java.lang.Boolean)` was added + +#### `models.InitContainer` was modified + +* `withImageType(models.ImageType)` was added + +#### `models.QueueScaleRule` was modified + +* `accountName()` was added +* `identity()` was added +* `withIdentity(java.lang.String)` was added +* `withAccountName(java.lang.String)` was added + +#### `models.ConnectedEnvironmentsDaprComponents` was modified + +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.ConnectedEnvironmentStorageProperties` was modified + +* `deploymentErrors()` was added +* `smb()` was added +* `provisioningState()` was added +* `withSmb(models.SmbStorage)` was added + +#### `models.ManagedEnvironmentStorageProperties` was modified + +* `nfsAzureFile()` was added +* `withNfsAzureFile(models.NfsAzureFileProperties)` was added + +#### `models.GithubActionConfiguration` was modified + +* `withBuildEnvironmentVariables(java.util.List)` was added +* `buildEnvironmentVariables()` was added +* `withDockerfilePath(java.lang.String)` was added +* `dockerfilePath()` was added + +#### `models.DaprComponent` was modified + +* `serviceComponentBind()` was added + +#### `models.TcpScaleRule` was modified + +* `withIdentity(java.lang.String)` was added +* `identity()` was added + +#### `models.Scale` was modified + +* `withPollingInterval(java.lang.Integer)` was added +* `withCooldownPeriod(java.lang.Integer)` was added +* `pollingInterval()` was added +* `cooldownPeriod()` was added + +#### `models.LogAnalyticsConfiguration` was modified + +* `dynamicJsonColumns()` was added +* `withDynamicJsonColumns(java.lang.Boolean)` was added + +#### `models.ManagedEnvironment` was modified + +* `appInsightsConfiguration()` was added +* `publicNetworkAccess()` was added +* `identity()` was added +* `availabilityZones()` was added +* `openTelemetryConfiguration()` was added +* `privateEndpointConnections()` was added + +#### `models.ConnectedEnvironmentsCertificates` was modified + +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.HttpScaleRule` was modified + +* `withIdentity(java.lang.String)` was added +* `identity()` was added + +#### `models.DaprComponents` was modified + +* `define(java.lang.String)` was added +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added +* `getById(java.lang.String)` was added +* `deleteById(java.lang.String)` was added + +#### `models.Container` was modified + +* `withImageType(models.ImageType)` was added + +#### `models.CertificateProperties` was modified + +* `withCertificateKeyVaultProperties(models.CertificateKeyVaultProperties)` was added +* `deploymentErrors()` was added +* `certificateType()` was added +* `certificateKeyVaultProperties()` was added +* `withCertificateType(models.CertificateType)` was added + +#### `models.ContainerApp` was modified + +* `kind()` was added +* `patchingConfiguration()` was added +* `deploymentErrors()` was added + +#### `models.JobScaleRule` was modified + +* `identity()` was added +* `withIdentity(java.lang.String)` was added + +#### `models.ReplicaContainer` was modified + +* `debugEndpoint()` was added + +#### `models.ContainerApp$Definition` was modified + +* `withPatchingConfiguration(models.ContainerAppPropertiesPatchingConfiguration)` was added +* `withKind(models.Kind)` was added + +#### `models.CustomDomainConfiguration` was modified + +* `withCertificateKeyVaultProperties(models.CertificateKeyVaultProperties)` was added +* `certificateKeyVaultProperties()` was added + +#### `models.Configuration` was modified + +* `withRevisionTransitionThreshold(java.lang.Integer)` was added +* `withRuntime(models.Runtime)` was added +* `identitySettings()` was added +* `targetLabel()` was added +* `revisionTransitionThreshold()` was added +* `runtime()` was added +* `withTargetLabel(java.lang.String)` was added +* `withIdentitySettings(java.util.List)` was added + +#### `models.DaprComponent$Definition` was modified + +* `withServiceComponentBind(java.util.List)` was added +* `withExistingManagedEnvironment(java.lang.String,java.lang.String)` was added + +#### `models.ManagedEnvironment$Update` was modified + +* `withAppInsightsConfiguration(models.AppInsightsConfiguration)` was added +* `withAvailabilityZones(java.util.List)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added +* `withOpenTelemetryConfiguration(models.OpenTelemetryConfiguration)` was added + +#### `models.SourceControl$Definition` was modified + +* `withXMsGithubAuxiliary(java.lang.String)` was added + +#### `models.ConnectedEnvironmentsStorages` was modified + +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Job$Definition` was modified + +* `withExtendedLocation(models.ExtendedLocation)` was added + +#### `models.Jobs` was modified + +* `resume(java.lang.String,java.lang.String)` was added +* `suspend(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resume(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `suspend(java.lang.String,java.lang.String)` was added + +#### `models.DaprComponent$Update` was modified + +* `withServiceComponentBind(java.util.List)` was added + +#### `models.ManagedEnvironment$Definition` was modified + +* `withAppInsightsConfiguration(models.AppInsightsConfiguration)` was added +* `withOpenTelemetryConfiguration(models.OpenTelemetryConfiguration)` was added +* `withAvailabilityZones(java.util.List)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added + +#### `models.ContainerApp$Update` was modified + +* `withPatchingConfiguration(models.ContainerAppPropertiesPatchingConfiguration)` was added + +#### `models.JobConfiguration` was modified + +* `withIdentitySettings(java.util.List)` was added +* `identitySettings()` was added + +#### `models.SourceControl$Update` was modified + +* `withXMsGithubAuxiliary(java.lang.String)` was added + +#### `models.Job$Update` was modified + +* `withExtendedLocation(models.ExtendedLocation)` was added + +#### `models.JobExecution` was modified + +* `detailedStatus()` was added + +#### `models.JobPatchProperties` was modified + +* `extendedLocation()` was added +* `withExtendedLocation(models.ExtendedLocation)` was added + +#### `ContainerAppsApiManager` was modified + +* `containerAppsBuildsByContainerApps()` was added +* `containerAppsBuilds()` was added +* `daprComponentResiliencyPolicies()` was added +* `managedEnvironmentPrivateLinkResources()` was added +* `buildAuthTokens()` was added +* `maintenanceConfigurations()` was added +* `javaComponents()` was added +* `functionsExtensions()` was added +* `containerAppsPatches()` was added +* `containerAppsLabelHistories()` was added +* `builds()` was added +* `dotNetComponents()` was added +* `appResiliencies()` was added +* `daprSubscriptions()` was added +* `buildsByBuilderResources()` was added +* `logicApps()` was added +* `builders()` was added +* `httpRouteConfigs()` was added +* `containerAppsSessionPools()` was added +* `managedEnvironmentPrivateEndpointConnections()` was added + +#### `models.BaseContainer` was modified + +* `imageType()` was added +* `withImageType(models.ImageType)` was added + +#### `models.BlobStorageTokenStore` was modified + +* `withManagedIdentityResourceId(java.lang.String)` was added +* `blobContainerUri()` was added +* `clientId()` was added +* `withClientId(java.lang.String)` was added +* `managedIdentityResourceId()` was added +* `withBlobContainerUri(java.lang.String)` was added + +#### `models.CustomScaleRule` was modified + +* `withIdentity(java.lang.String)` was added +* `identity()` was added + +#### `models.ContainerResources` was modified + +* `gpu()` was added +* `withGpu(java.lang.Double)` was added + +#### `models.Ingress` was modified + +* `targetPortHttpScheme()` was added +* `withTargetPortHttpScheme(models.IngressTargetPortHttpScheme)` was added ## 1.1.0-beta.1 (2024-10-17) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index 9d05f22b61283..bfa3a441a99c7 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. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-10. 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.1.0-beta.1 + 1.1.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index 7eeafade7da34..7770f3bada5e9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -119,6 +119,11 @@ - [ListDetectors](#containerappsdiagnostics_listdetectors) - [ListRevisions](#containerappsdiagnostics_listrevisions) +## ContainerAppsLabelHistory + +- [GetLabelHistory](#containerappslabelhistory_getlabelhistory) +- [ListLabelHistory](#containerappslabelhistory_listlabelhistory) + ## ContainerAppsPatches - [Apply](#containerappspatches_apply) @@ -190,6 +195,14 @@ - [InvokeFunctionsHost](#functionsextension_invokefunctionshost) +## HttpRouteConfig + +- [CreateOrUpdate](#httprouteconfig_createorupdate) +- [Delete](#httprouteconfig_delete) +- [Get](#httprouteconfig_get) +- [List](#httprouteconfig_list) +- [Update](#httprouteconfig_update) + ## JavaComponents - [CreateOrUpdate](#javacomponents_createorupdate) @@ -231,6 +244,13 @@ - [ListWorkflows](#logicapps_listworkflows) - [ListWorkflowsConnections](#logicapps_listworkflowsconnections) +## MaintenanceConfigurations + +- [CreateOrUpdate](#maintenanceconfigurations_createorupdate) +- [Delete](#maintenanceconfigurations_delete) +- [Get](#maintenanceconfigurations_get) +- [List](#maintenanceconfigurations_list) + ## ManagedCertificates - [CreateOrUpdate](#managedcertificates_createorupdate) @@ -315,7 +335,7 @@ import java.util.Arrays; public final class AppResiliencyCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AppResiliency_CreateOrUpdate * .json */ /** @@ -359,7 +379,7 @@ public final class AppResiliencyCreateOrUpdateSamples { public final class AppResiliencyDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AppResiliency_Delete.json */ /** * Sample code: Delete App Resiliency. @@ -382,7 +402,7 @@ public final class AppResiliencyDeleteSamples { public final class AppResiliencyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AppResiliency_Get.json */ /** * Sample code: Get App Resiliency. @@ -405,7 +425,7 @@ public final class AppResiliencyGetSamples { public final class AppResiliencyListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AppResiliency_List.json */ /** * Sample code: List App Resiliency. @@ -430,7 +450,7 @@ import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; public final class AppResiliencyUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AppResiliency_Patch.json */ /** * Sample code: Update App Resiliency. @@ -456,7 +476,7 @@ public final class AppResiliencyUpdateSamples { */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * AvailableWorkloadProfiles_Get.json */ /** @@ -479,7 +499,7 @@ public final class AvailableWorkloadProfilesGetSamples { public final class BillingMetersGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/BillingMeters_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -501,7 +521,7 @@ public final class BillingMetersGetSamples { public final class BuildAuthTokenListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListAuthToken.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builds_ListAuthToken.json */ /** * Sample code: Get Build Auth Token. @@ -531,7 +551,7 @@ import java.util.Map; public final class BuildersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builders_CreateOrUpdate.json */ /** * Sample code: Builders_CreateOrUpdate_0. @@ -585,7 +605,7 @@ public final class BuildersCreateOrUpdateSamples { public final class BuildersDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builders_Delete.json */ /** * Sample code: Builders_Delete_0. @@ -607,7 +627,7 @@ public final class BuildersDeleteSamples { public final class BuildersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builders_Get.json */ /** * Sample code: Builders_Get_0. @@ -629,7 +649,7 @@ public final class BuildersGetByResourceGroupSamples { public final class BuildersListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListBySubscription. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builders_ListBySubscription. * json */ /** @@ -653,7 +673,7 @@ public final class BuildersListSamples { public final class BuildersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListByResourceGroup + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builders_ListByResourceGroup * .json */ /** @@ -681,7 +701,7 @@ import java.util.Map; public final class BuildersUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Update.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builders_Update.json */ /** * Sample code: Builders_Update_0. @@ -725,7 +745,7 @@ import java.util.Arrays; public final class BuildsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builds_CreateOrUpdate.json */ /** * Sample code: Builds_CreateOrUpdate_WithConfig. @@ -759,7 +779,7 @@ public final class BuildsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Builds_CreateOrUpdate_NoConfig.json */ /** @@ -783,7 +803,7 @@ public final class BuildsCreateOrUpdateSamples { public final class BuildsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builds_Delete.json */ /** * Sample code: Builds_Delete_0. @@ -805,7 +825,7 @@ public final class BuildsDeleteSamples { public final class BuildsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builds_Get.json */ /** * Sample code: Builds_Get_0. @@ -827,7 +847,7 @@ public final class BuildsGetSamples { public final class BuildsByBuilderResourceListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListByBuilderResource + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Builds_ListByBuilderResource * .json */ /** @@ -855,7 +875,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateType; */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Certificate_CreateOrUpdate_FromKeyVault.json */ /** @@ -878,7 +898,7 @@ public final class CertificatesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Certificate_CreateOrUpdate. * json */ /** @@ -908,7 +928,7 @@ public final class CertificatesCreateOrUpdateSamples { public final class CertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -932,7 +952,7 @@ public final class CertificatesDeleteSamples { public final class CertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -955,7 +975,7 @@ public final class CertificatesGetSamples { */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Certificates_ListByManagedEnvironment.json */ /** @@ -983,7 +1003,7 @@ import java.util.Map; public final class CertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificates_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -1021,7 +1041,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** @@ -1050,7 +1070,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironments_CreateOrUpdate.json */ /** @@ -1083,7 +1103,7 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { public final class ConnectedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Delete + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ConnectedEnvironments_Delete * .json */ /** @@ -1107,7 +1127,7 @@ public final class ConnectedEnvironmentsDeleteSamples { public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Get. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ConnectedEnvironments_Get. * json */ /** @@ -1131,7 +1151,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironments_ListBySubscription.json */ /** @@ -1154,7 +1174,7 @@ public final class ConnectedEnvironmentsListSamples { */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironments_ListByResourceGroup.json */ /** @@ -1178,7 +1198,7 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { public final class ConnectedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ConnectedEnvironments_Patch. * json */ /** @@ -1203,7 +1223,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** @@ -1232,7 +1252,7 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsCertificate_Delete.json */ /** @@ -1242,8 +1262,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironmentsCertificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + .delete("examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` @@ -1256,7 +1275,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsCertificate_Get.json */ /** @@ -1280,7 +1299,7 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** @@ -1308,7 +1327,7 @@ import java.util.Map; */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsCertificates_Patch.json */ /** @@ -1341,6 +1360,7 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { ### ConnectedEnvironmentsDaprComponents_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentDaprComponentProperties; import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; @@ -1352,7 +1372,7 @@ import java.util.Arrays; */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** @@ -1365,20 +1385,21 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { manager.connectedEnvironmentsDaprComponents() .define("reddog") .withExistingConnectedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .withProperties(new ConnectedEnvironmentDaprComponentProperties().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind"))))) .create(); } } @@ -1392,7 +1413,7 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Delete.json */ /** @@ -1402,7 +1423,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + .delete("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -1415,7 +1436,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Get.json */ /** @@ -1438,7 +1459,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_List.json */ /** @@ -1461,7 +1482,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** @@ -1489,7 +1510,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** @@ -1520,7 +1541,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_Delete.json */ /** @@ -1531,7 +1552,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironmentsStorages() - .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); + .delete("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -1544,7 +1565,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_Get.json */ /** @@ -1568,7 +1589,7 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_List.json */ /** @@ -1650,7 +1671,7 @@ import java.util.Map; */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_SourceToCloudApp_CreateOrUpdate.json */ /** @@ -1719,6 +1740,7 @@ public final class ContainerAppsCreateOrUpdateSamples { .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100) .withService(new Service().withType("redis"))) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") @@ -1770,7 +1792,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** @@ -1844,7 +1866,8 @@ public final class ContainerAppsCreateOrUpdateSamples { .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) - .withMaxInactiveRevisions(10)) + .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100)) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") .withName("testinitcontainerApp0") @@ -1874,7 +1897,7 @@ public final class ContainerAppsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_CreateOrUpdate * .json */ /** @@ -1955,6 +1978,7 @@ public final class ContainerAppsCreateOrUpdateSamples { .withLevel(Level.DEBUG)))))) .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100) .withService(new Service().withType("redis")) .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") @@ -1965,7 +1989,7 @@ public final class ContainerAppsCreateOrUpdateSamples { .withName("testinitcontainerApp0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi").withGpu(1.0D)))) .withContainers(Arrays.asList(new Container() .withImage("repo/testcontainerApp0:v1") .withName("testcontainerApp0") @@ -2020,7 +2044,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_TcpApp_CreateOrUpdate.json */ /** @@ -2059,7 +2083,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_Kind_CreateOrUpdate.json */ /** @@ -2089,7 +2113,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** @@ -2152,7 +2176,7 @@ public final class ContainerAppsCreateOrUpdateSamples { public final class ContainerAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -2174,7 +2198,7 @@ public final class ContainerAppsDeleteSamples { public final class ContainerAppsGetAuthTokenSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_GetAuthToken. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_GetAuthToken. * json */ /** @@ -2198,7 +2222,7 @@ public final class ContainerAppsGetAuthTokenSamples { public final class ContainerAppsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -2220,7 +2244,7 @@ public final class ContainerAppsGetByResourceGroupSamples { */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ListBySubscription.json */ /** @@ -2243,7 +2267,7 @@ public final class ContainerAppsListSamples { */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ListByResourceGroup.json */ /** @@ -2266,7 +2290,7 @@ public final class ContainerAppsListByResourceGroupSamples { */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ListCustomHostNameAnalysis.json */ /** @@ -2291,7 +2315,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { public final class ContainerAppsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_ListSecrets. * json */ /** @@ -2315,7 +2339,7 @@ public final class ContainerAppsListSecretsSamples { public final class ContainerAppsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. @@ -2337,7 +2361,7 @@ public final class ContainerAppsStartSamples { public final class ContainerAppsStopSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Stop.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. @@ -2396,7 +2420,7 @@ import java.util.Map; public final class ContainerAppsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -2454,6 +2478,7 @@ public final class ContainerAppsUpdateSamples { new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100) .withService(new Service().withType("redis"))) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") @@ -2505,10 +2530,13 @@ public final class ContainerAppsUpdateSamples { ```java import com.azure.resourcemanager.appcontainers.models.AppRegistration; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.BlobStorageTokenStore; import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.Facebook; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; +import com.azure.resourcemanager.appcontainers.models.Login; +import com.azure.resourcemanager.appcontainers.models.TokenStore; import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; /** @@ -2517,7 +2545,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_CreateOrUpdate. * json */ /** @@ -2540,6 +2568,64 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) .create(); } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * AuthConfigs_BlobStorageTokenStore_ClientId_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App AuthConfig with msi clientID blob storage token store. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppAuthConfigWithMsiClientIDBlobStorageTokenStore( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .define("current") + .withExistingContainerApp("rg1", "myapp") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withLogin(new Login().withTokenStore(new TokenStore().withAzureBlobStorage( + new BlobStorageTokenStore().withBlobContainerUri("https://test.blob.core.windows.net/container1") + .withClientId("00000000-0000-0000-0000-000000000000")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * AuthConfigs_BlobStorageTokenStore_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App AuthConfig with msi managedIdentityResourceId blob storage token + * store. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppAuthConfigWithMsiManagedIdentityResourceIdBlobStorageTokenStore( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .define("current") + .withExistingContainerApp("rg1", "myapp") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withLogin(new Login().withTokenStore(new TokenStore().withAzureBlobStorage(new BlobStorageTokenStore() + .withBlobContainerUri("https://test.blob.core.windows.net/container1") + .withManagedIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) + .create(); + } } ``` @@ -2552,7 +2638,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { public final class ContainerAppsAuthConfigsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -2576,7 +2662,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { public final class ContainerAppsAuthConfigsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -2600,7 +2686,7 @@ public final class ContainerAppsAuthConfigsGetSamples { public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_ListByContainer. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_ListByContainer. * json */ /** @@ -2625,7 +2711,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { public final class ContainerAppsBuildsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsBuilds_Delete. * json */ /** @@ -2649,7 +2735,7 @@ public final class ContainerAppsBuildsDeleteSamples { public final class ContainerAppsBuildsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsBuilds_Get.json */ /** * Sample code: ContainerAppsBuilds_Get_0. @@ -2671,7 +2757,7 @@ public final class ContainerAppsBuildsGetSamples { */ public final class ContainerAppsBuildsByContainerAppListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsBuilds_ListByContainerApp.json */ /** @@ -2695,7 +2781,7 @@ public final class ContainerAppsBuildsByContainerAppListSamples { public final class ContainerAppsDiagnosticsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsDiagnostics_Get + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsDiagnostics_Get * .json */ /** @@ -2721,7 +2807,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { public final class ContainerAppsDiagnosticsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -2746,7 +2832,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { public final class ContainerAppsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -2768,7 +2854,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsDiagnostics_List.json */ /** @@ -2793,7 +2879,7 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { public final class ContainerAppsDiagnosticsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -2808,6 +2894,54 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { } ``` +### ContainerAppsLabelHistory_GetLabelHistory + +```java +/** + * Samples for ContainerAppsLabelHistory GetLabelHistory. + */ +public final class ContainerAppsLabelHistoryGetLabelHistorySamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LabelHistory_Get.json + */ + /** + * Sample code: Get Container App's single label history. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSSingleLabelHistory(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsLabelHistories() + .getLabelHistoryWithResponse("rg", "testContainerApp", "dev", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsLabelHistory_ListLabelHistory + +```java +/** + * Samples for ContainerAppsLabelHistory ListLabelHistory. + */ +public final class ContainerAppsLabelHistoryListLabelHistorySamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LabelHistory_List.json + */ + /** + * Sample code: List Container App's all label history. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSAllLabelHistory(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsLabelHistories() + .listLabelHistory("rg", "testContainerApp", null, com.azure.core.util.Context.NONE); + } +} +``` + ### ContainerAppsPatches_Apply ```java @@ -2817,7 +2951,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { public final class ContainerAppsPatchesApplySamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Apply. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsPatches_Apply. * json */ /** @@ -2841,7 +2975,7 @@ public final class ContainerAppsPatchesApplySamples { public final class ContainerAppsPatchesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsPatches_Delete. * json */ /** @@ -2865,7 +2999,7 @@ public final class ContainerAppsPatchesDeleteSamples { public final class ContainerAppsPatchesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Get. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsPatches_Get. * json */ /** @@ -2889,7 +3023,7 @@ public final class ContainerAppsPatchesGetSamples { */ public final class ContainerAppsPatchesListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsPatches_ListByContainerApp.json */ /** @@ -2914,7 +3048,7 @@ import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; */ public final class ContainerAppsPatchesSkipConfigureSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsPatches_Skip_Configure.json */ /** @@ -2940,7 +3074,7 @@ public final class ContainerAppsPatchesSkipConfigureSamples { public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -2965,7 +3099,7 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { public final class ContainerAppsRevisionReplicasListReplicasSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -2989,7 +3123,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { public final class ContainerAppsRevisionsActivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Activate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -3014,7 +3148,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Deactivate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -3039,7 +3173,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { public final class ContainerAppsRevisionsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -3064,7 +3198,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { public final class ContainerAppsRevisionsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -3088,7 +3222,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { public final class ContainerAppsRevisionsRestartRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Restart.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -3111,6 +3245,10 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityAutoGenerated; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionContainer; @@ -3118,6 +3256,7 @@ import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; import com.azure.resourcemanager.appcontainers.models.SessionIngress; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionRegistryCredentials; import java.util.Arrays; /** @@ -3126,7 +3265,7 @@ import java.util.Arrays; public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_CreateOrUpdate. * json */ /** @@ -3140,6 +3279,8 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .define("testsessionpool") .withRegion("East US") .withExistingResourceGroup("rg") + .withIdentity( + new ManagedServiceIdentityAutoGenerated().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withContainerType(ContainerType.CUSTOM_CONTAINER) @@ -3149,6 +3290,9 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .withDynamicPoolConfiguration( new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) .withCustomContainerTemplate(new CustomContainerTemplate() + .withRegistryCredentials(new SessionRegistryCredentials().withServer("test.azurecr.io") + .withIdentity( + "/subscriptions/7a497526-bb8d-4816-9795-db1418a1f977/resourcegroups/test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testSP")) .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") .withName("testinitcontainer") .withCommand(Arrays.asList("/bin/sh")) @@ -3157,6 +3301,8 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .withIngress(new SessionIngress().withTargetPort(80))) .withSessionNetworkConfiguration( new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .withManagedIdentitySettings(Arrays.asList( + new ManagedIdentitySetting().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.MAIN))) .create(); } } @@ -3171,7 +3317,7 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { public final class ContainerAppsSessionPoolsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_Delete.json */ /** * Sample code: Delete Session Pool. @@ -3193,7 +3339,7 @@ public final class ContainerAppsSessionPoolsDeleteSamples { public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_Get.json */ /** * Sample code: Get Session Pool. @@ -3215,7 +3361,7 @@ public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { */ public final class ContainerAppsSessionPoolsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SessionPools_ListBySubscription.json */ /** @@ -3238,7 +3384,7 @@ public final class ContainerAppsSessionPoolsListSamples { */ public final class ContainerAppsSessionPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SessionPools_ListByResourceGroup.json */ /** @@ -3274,7 +3420,7 @@ import java.util.Arrays; public final class ContainerAppsSessionPoolsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_Patch.json */ /** * Sample code: Update Session Pool. @@ -3318,7 +3464,7 @@ import java.util.Arrays; */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SourceControls_CreateOrUpdate.json */ /** @@ -3363,7 +3509,7 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { public final class ContainerAppsSourceControlsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -3388,7 +3534,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { public final class ContainerAppsSourceControlsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -3411,7 +3557,7 @@ public final class ContainerAppsSourceControlsGetSamples { */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SourceControls_ListByContainer.json */ /** @@ -3440,7 +3586,7 @@ import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPol */ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** @@ -3468,7 +3614,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** @@ -3507,7 +3653,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** @@ -3543,7 +3689,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicies_Delete.json */ /** @@ -3568,7 +3714,7 @@ public final class DaprComponentResiliencyPoliciesDeleteSamples { */ public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicies_Get.json */ /** @@ -3593,7 +3739,7 @@ public final class DaprComponentResiliencyPoliciesGetSamples { */ public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicies_List.json */ /** @@ -3612,7 +3758,6 @@ public final class DaprComponentResiliencyPoliciesListSamples { ### DaprComponents_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; @@ -3624,7 +3769,7 @@ import java.util.Arrays; */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponents_CreateOrUpdate_Secrets.json */ /** @@ -3635,27 +3780,27 @@ public final class DaprComponentsCreateOrUpdateSamples { public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents() - .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), - com.azure.core.util.Context.NONE); + .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("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** @@ -3666,23 +3811,23 @@ public final class DaprComponentsCreateOrUpdateSamples { public static void createOrUpdateDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents() - .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("fakeTokenPlaceholder") - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), - com.azure.core.util.Context.NONE); + .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("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .create(); } } ``` @@ -3696,7 +3841,7 @@ public final class DaprComponentsCreateOrUpdateSamples { public final class DaprComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -3718,7 +3863,7 @@ public final class DaprComponentsDeleteSamples { */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponents_Get_SecretStoreComponent.json */ /** @@ -3734,7 +3879,7 @@ public final class DaprComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Get_Secrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_Get_Secrets. * json */ /** @@ -3759,7 +3904,7 @@ public final class DaprComponentsGetSamples { public final class DaprComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -3781,7 +3926,7 @@ public final class DaprComponentsListSamples { public final class DaprComponentsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_ListSecrets. * json */ /** @@ -3812,7 +3957,7 @@ import java.util.Map; */ public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** @@ -3837,7 +3982,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json */ /** @@ -3857,7 +4002,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** @@ -3903,7 +4048,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { public final class DaprSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprSubscriptions_Delete. * json */ /** @@ -3926,7 +4071,7 @@ public final class DaprSubscriptionsDeleteSamples { */ public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_Get_DefaultRoute.json */ /** @@ -3941,7 +4086,7 @@ public final class DaprSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** @@ -3956,7 +4101,7 @@ public final class DaprSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** @@ -3981,7 +4126,7 @@ public final class DaprSubscriptionsGetSamples { public final class DaprSubscriptionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprSubscriptions_List.json */ /** * Sample code: List Dapr subscriptions. @@ -4007,7 +4152,7 @@ import java.util.Arrays; */ public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_CreateOrUpdate.json */ /** @@ -4027,7 +4172,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -4060,7 +4205,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { public final class DotNetComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_Delete.json */ /** * Sample code: Delete .NET Component. @@ -4082,7 +4227,7 @@ public final class DotNetComponentsDeleteSamples { */ public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_Get_ServiceBind.json */ /** @@ -4098,7 +4243,7 @@ public final class DotNetComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_Get.json */ /** * Sample code: Get .NET Component. @@ -4121,7 +4266,7 @@ public final class DotNetComponentsGetSamples { public final class DotNetComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_List.json */ /** * Sample code: List .NET Components. @@ -4133,7 +4278,7 @@ public final class DotNetComponentsListSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_List_ServiceBind.json */ /** @@ -4162,7 +4307,7 @@ import java.util.Arrays; */ public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_Patch_ServiceBind.json */ /** @@ -4187,7 +4332,7 @@ public final class DotNetComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_Patch.json */ /** * Sample code: Patch .NET Component. @@ -4216,7 +4361,7 @@ public final class DotNetComponentsUpdateSamples { public final class FunctionsExtensionInvokeFunctionsHostSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/FunctionsExtension_Post.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/FunctionsExtension_Post.json */ /** * Sample code: Invoke Functions host using Functions Extension API. @@ -4232,6 +4377,230 @@ public final class FunctionsExtensionInvokeFunctionsHostSamples { } ``` +### HttpRouteConfig_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.HttpRoute; +import com.azure.resourcemanager.appcontainers.models.HttpRouteAction; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigProperties; +import com.azure.resourcemanager.appcontainers.models.HttpRouteMatch; +import com.azure.resourcemanager.appcontainers.models.HttpRouteRule; +import com.azure.resourcemanager.appcontainers.models.HttpRouteTarget; +import java.util.Arrays; + +/** + * Samples for HttpRouteConfig CreateOrUpdate. + */ +public final class HttpRouteConfigCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Http Route. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateHttpRoute(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .define("httproutefriendlyname") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays + .asList(new HttpRouteTarget().withContainerApp("capp-1").withRevision("rev-1").withWeight(100))) + .withRoutes(Arrays + .asList(new HttpRoute().withMatch(new HttpRouteMatch().withPath("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json + */ + /** + * Sample code: Create or Update Http Route Path Separated Prefix Rule. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateHttpRoutePathSeparatedPrefixRule( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .define("httproutefriendlyname") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.DISABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays.asList(new HttpRouteTarget().withContainerApp("capp-1").withLabel("label-1"))) + .withRoutes(Arrays.asList(new HttpRoute() + .withMatch(new HttpRouteMatch().withPathSeparatedPrefix("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_CreateOrUpdatePrefix.json + */ + /** + * Sample code: Create or Update Http Route Prefix Rule. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateHttpRoutePrefixRule(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .define("httproutefriendlyname") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.DISABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays.asList(new HttpRouteTarget().withContainerApp("capp-1").withLabel("label-1"))) + .withRoutes(Arrays.asList( + new HttpRoute().withMatch(new HttpRouteMatch().withPrefix("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .create(); + } +} +``` + +### HttpRouteConfig_Delete + +```java +/** + * Samples for HttpRouteConfig Delete. + */ +public final class HttpRouteConfigDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .deleteWithResponse("examplerg", "testcontainerenv", "httproutefriendlyname", + com.azure.core.util.Context.NONE); + } +} +``` + +### HttpRouteConfig_Get + +```java +/** + * Samples for HttpRouteConfig Get. + */ +public final class HttpRouteConfigGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Get.json + */ + /** + * Sample code: Get HttpRoute. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getHttpRoute(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .getWithResponse("examplerg", "testcontainerenv", "httproutefriendlyname", + com.azure.core.util.Context.NONE); + } +} +``` + +### HttpRouteConfig_List + +```java +/** + * Samples for HttpRouteConfig List. + */ +public final class HttpRouteConfigListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_ListByManagedEnvironment.json + */ + /** + * Sample code: List Managed Http Routes by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listManagedHttpRoutesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + } +} +``` + +### HttpRouteConfig_Update + +```java +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.HttpRoute; +import com.azure.resourcemanager.appcontainers.models.HttpRouteAction; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfig; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigProperties; +import com.azure.resourcemanager.appcontainers.models.HttpRouteMatch; +import com.azure.resourcemanager.appcontainers.models.HttpRouteRule; +import com.azure.resourcemanager.appcontainers.models.HttpRouteTarget; +import java.util.Arrays; + +/** + * Samples for HttpRouteConfig Update. + */ +public final class HttpRouteConfigUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Patch.json + */ + /** + * Sample code: Patch Managed Http Route. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchManagedHttpRoute(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + HttpRouteConfig resource = manager.httpRouteConfigs() + .getWithResponse("examplerg", "testcontainerenv", "httproutefriendlyname", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays + .asList(new HttpRouteTarget().withContainerApp("capp-1").withRevision("rev-1").withWeight(100))) + .withRoutes(Arrays + .asList(new HttpRoute().withMatch(new HttpRouteMatch().withPath("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .apply(); + } +} +``` + ### JavaComponents_CreateOrUpdate ```java @@ -4246,7 +4615,7 @@ import java.util.Arrays; */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -4272,7 +4641,7 @@ public final class JavaComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_CreateOrUpdate.json */ /** @@ -4305,7 +4674,7 @@ public final class JavaComponentsCreateOrUpdateSamples { public final class JavaComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. @@ -4328,7 +4697,7 @@ public final class JavaComponentsDeleteSamples { public final class JavaComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -4341,7 +4710,7 @@ public final class JavaComponentsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_Get_ServiceBind.json */ /** @@ -4366,7 +4735,7 @@ public final class JavaComponentsGetSamples { public final class JavaComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -4378,7 +4747,7 @@ public final class JavaComponentsListSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_List_ServiceBind.json */ /** @@ -4409,7 +4778,7 @@ import java.util.Arrays; public final class JavaComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -4431,7 +4800,7 @@ public final class JavaComponentsUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_Patch_ServiceBind.json */ /** @@ -4496,7 +4865,7 @@ import java.util.Map; */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Job_CreateorUpdate_ConnectedEnvironment.json */ /** @@ -4542,7 +4911,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Job_CreateorUpdate_EventTrigger.json */ /** @@ -4589,7 +4958,7 @@ public final class JobsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_CreateorUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -4623,7 +4992,7 @@ public final class JobsCreateOrUpdateSamples { .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi").withGpu(1.0D)))) .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") .withName("testcontainerAppsJob0") .withVolumeMounts(Arrays.asList( @@ -4669,7 +5038,7 @@ public final class JobsCreateOrUpdateSamples { public final class JobsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. @@ -4691,7 +5060,7 @@ public final class JobsDeleteSamples { public final class JobsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. @@ -4713,7 +5082,7 @@ public final class JobsGetByResourceGroupSamples { public final class JobsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_GetDetector.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. @@ -4738,7 +5107,7 @@ public final class JobsGetDetectorSamples { public final class JobsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListBySubscription.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. @@ -4761,7 +5130,7 @@ public final class JobsListSamples { public final class JobsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListByResourceGroup. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_ListByResourceGroup. * json */ /** @@ -4785,7 +5154,7 @@ public final class JobsListByResourceGroupSamples { public final class JobsListDetectorsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListDetectors.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. @@ -4808,7 +5177,7 @@ public final class JobsListDetectorsSamples { public final class JobsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListSecrets.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. @@ -4831,7 +5200,7 @@ public final class JobsListSecretsSamples { public final class JobsProxyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ProxyGet.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. @@ -4854,7 +5223,7 @@ public final class JobsProxyGetSamples { public final class JobsResumeSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_Resume.json */ /** * Sample code: Resume Job. @@ -4881,7 +5250,7 @@ import java.util.Arrays; public final class JobsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -4913,7 +5282,7 @@ public final class JobsStartSamples { public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Execution.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. @@ -4936,7 +5305,7 @@ public final class JobsStopExecutionSamples { public final class JobsStopMultipleExecutionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Multiple.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -4959,7 +5328,7 @@ public final class JobsStopMultipleExecutionsSamples { public final class JobsSuspendSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_Suspend.json */ /** * Sample code: Suspend Job. @@ -4996,7 +5365,7 @@ import java.util.Arrays; public final class JobsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -5046,7 +5415,7 @@ public final class JobsUpdateSamples { public final class JobsExecutionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Executions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. @@ -5073,7 +5442,7 @@ import java.io.IOException; public final class LogicAppsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Create.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_Create.json */ /** * Sample code: Create logic app extension. @@ -5101,7 +5470,7 @@ public final class LogicAppsCreateOrUpdateSamples { public final class LogicAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_Delete.json */ /** * Sample code: Create logic app extension. @@ -5131,7 +5500,7 @@ import java.util.Arrays; */ public final class LogicAppsDeployWorkflowArtifactsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * LogicApps_PostDeployWorkflowArtifacts.json */ /** @@ -5155,7 +5524,7 @@ public final class LogicAppsDeployWorkflowArtifactsSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * LogicApps_DeleteDeployWorkflowArtifacts.json */ /** @@ -5182,7 +5551,7 @@ public final class LogicAppsDeployWorkflowArtifactsSamples { public final class LogicAppsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_Get.json */ /** * Sample code: Get logic app extension by name. @@ -5206,7 +5575,7 @@ public final class LogicAppsGetSamples { public final class LogicAppsGetWorkflowSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_GetWorkflow.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_GetWorkflow.json */ /** * Sample code: GET a workflow. @@ -5232,7 +5601,7 @@ import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; public final class LogicAppsInvokeSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListCallbackURL. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_ListCallbackURL. * json */ /** @@ -5259,7 +5628,7 @@ public final class LogicAppsInvokeSamples { public final class LogicAppsListWorkflowsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListWorkflows.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_ListWorkflows.json */ /** * Sample code: List the workflows. @@ -5282,7 +5651,7 @@ public final class LogicAppsListWorkflowsSamples { public final class LogicAppsListWorkflowsConnectionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListConnections. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_ListConnections. * json */ /** @@ -5299,6 +5668,109 @@ public final class LogicAppsListWorkflowsConnectionsSamples { } ``` +### MaintenanceConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.ScheduledEntry; +import com.azure.resourcemanager.appcontainers.models.WeekDay; +import java.util.Arrays; + +/** + * Samples for MaintenanceConfigurations CreateOrUpdate. + */ +public final class MaintenanceConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsCreateOrUpdate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsCreateOrUpdate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations() + .define("default") + .withExistingManagedEnvironment("rg1", "managedEnv") + .withScheduledEntries(Arrays + .asList(new ScheduledEntry().withWeekDay(WeekDay.SUNDAY).withStartHourUtc(12).withDurationHours(9))) + .create(); + } +} +``` + +### MaintenanceConfigurations_Delete + +```java +/** + * Samples for MaintenanceConfigurations Delete. + */ +public final class MaintenanceConfigurationsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_Delete.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsDelete. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsDelete( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations() + .deleteWithResponse("rg1", "managedEnv", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_Get + +```java +/** + * Samples for MaintenanceConfigurations Get. + */ +public final class MaintenanceConfigurationsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_Get.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsGet. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsGet( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations() + .getWithResponse("rg1", "managedEnv", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_List + +```java +/** + * Samples for MaintenanceConfigurations List. + */ +public final class MaintenanceConfigurationsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_List.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsList. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsList( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations().list("rg1", "managedEnv", com.azure.core.util.Context.NONE); + } +} +``` + ### ManagedCertificates_CreateOrUpdate ```java @@ -5310,7 +5782,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperti */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedCertificate_CreateOrUpdate.json */ /** @@ -5340,7 +5812,7 @@ public final class ManagedCertificatesCreateOrUpdateSamples { public final class ManagedCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedCertificate_Delete. * json */ /** @@ -5365,7 +5837,7 @@ public final class ManagedCertificatesDeleteSamples { public final class ManagedCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -5388,7 +5860,7 @@ public final class ManagedCertificatesGetSamples { */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedCertificates_ListByManagedEnvironment.json */ /** @@ -5416,7 +5888,7 @@ import java.util.Map; public final class ManagedCertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificates_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedCertificates_Patch. * json */ /** @@ -5455,7 +5927,7 @@ public final class ManagedCertificatesUpdateSamples { */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentDiagnostics_Get.json */ /** @@ -5480,7 +5952,7 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentDiagnostics_List.json */ /** @@ -5508,7 +5980,7 @@ import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnecti */ public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json */ /** @@ -5538,7 +6010,7 @@ public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSam */ public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_Delete.json */ /** @@ -5562,7 +6034,7 @@ public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { */ public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_Get.json */ /** @@ -5586,7 +6058,7 @@ public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { */ public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_List.json */ /** @@ -5610,7 +6082,7 @@ public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { */ public final class ManagedEnvironmentPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateLinkResources_List.json */ /** @@ -5634,7 +6106,7 @@ public final class ManagedEnvironmentPrivateLinkResourcesListSamples { */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentUsages_List.json */ /** @@ -5682,7 +6154,7 @@ import java.util.Map; */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** @@ -5703,6 +6175,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withAppLogsConfiguration(new AppLogsConfiguration().withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") .withCertificateValue("Y2VydA==".getBytes()) .withCertificatePassword("fakeTokenPlaceholder")) @@ -5726,7 +6199,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_CreateOrUpdate.json */ /** @@ -5771,6 +6244,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withMetricsConfiguration( new MetricsConfiguration().withIncludeKeda(true).withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") .withCertificateValue("Y2VydA==".getBytes()) .withCertificatePassword("fakeTokenPlaceholder")) @@ -5819,7 +6293,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { public final class ManagedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Delete. * json */ /** @@ -5842,7 +6316,7 @@ public final class ManagedEnvironmentsDeleteSamples { */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_GetAuthToken.json */ /** @@ -5866,7 +6340,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { public final class ManagedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -5888,7 +6362,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_ListBySubscription.json */ /** @@ -5911,7 +6385,7 @@ public final class ManagedEnvironmentsListSamples { */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_ListByResourceGroup.json */ /** @@ -5934,7 +6408,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_ListWorkloadProfileStates.json */ /** @@ -5963,7 +6437,7 @@ import java.util.Map; public final class ManagedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Patch. * json */ /** @@ -6002,7 +6476,7 @@ public final class ManagedEnvironmentsUpdateSamples { public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -6029,7 +6503,7 @@ import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** @@ -6050,7 +6524,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** @@ -6081,7 +6555,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_Delete.json */ /** @@ -6105,7 +6579,7 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_Get.json */ /** @@ -6120,7 +6594,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** @@ -6144,7 +6618,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_List.json */ /** @@ -6170,7 +6644,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Certificates_CheckNameAvailability.json */ /** @@ -6188,7 +6662,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_CheckNameAvailability.json */ /** @@ -6215,7 +6689,7 @@ public final class NamespacesCheckNameAvailabilitySamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Operations_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -6236,7 +6710,7 @@ public final class OperationsListSamples { */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Subscriptions_GetCustomDomainVerificationId.json */ /** @@ -6259,7 +6733,7 @@ public final class ResourceProviderGetCustomDomainVerificationIdSamples { public final class ResourceProviderJobExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Execution_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -6282,7 +6756,7 @@ public final class ResourceProviderJobExecutionSamples { public final class UsagesListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Usages_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 51b0c047ec4f4..e5252c5f804af 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-08. + This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-10. 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 37ba910139649..1bc0dbab01ba9 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 @@ -42,6 +42,7 @@ import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsLabelHistoriesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; @@ -52,10 +53,12 @@ import com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsImpl; import com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsImpl; +import com.azure.resourcemanager.appcontainers.implementation.HttpRouteConfigsImpl; import com.azure.resourcemanager.appcontainers.implementation.JavaComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsImpl; import com.azure.resourcemanager.appcontainers.implementation.LogicAppsImpl; +import com.azure.resourcemanager.appcontainers.implementation.MaintenanceConfigurationsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateEndpointConnectionsImpl; @@ -85,6 +88,7 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsLabelHistories; import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; @@ -95,10 +99,12 @@ import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; import com.azure.resourcemanager.appcontainers.models.DotNetComponents; import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigs; import com.azure.resourcemanager.appcontainers.models.JavaComponents; import com.azure.resourcemanager.appcontainers.models.Jobs; import com.azure.resourcemanager.appcontainers.models.JobsExecutions; import com.azure.resourcemanager.appcontainers.models.LogicApps; +import com.azure.resourcemanager.appcontainers.models.MaintenanceConfigurations; import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateEndpointConnections; @@ -157,6 +163,8 @@ public final class ContainerAppsApiManager { private ContainerAppsPatches containerAppsPatches; + private ContainerAppsLabelHistories containerAppsLabelHistories; + private ContainerAppsRevisions containerAppsRevisions; private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; @@ -201,6 +209,10 @@ public final class ContainerAppsApiManager { private DaprSubscriptions daprSubscriptions; + private HttpRouteConfigs httpRouteConfigs; + + private MaintenanceConfigurations maintenanceConfigurations; + private ManagedEnvironmentsStorages managedEnvironmentsStorages; private ContainerAppsSessionPools containerAppsSessionPools; @@ -375,7 +387,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.1.0-beta.1"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -546,7 +558,8 @@ public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { } /** - * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages DaprComponent. + * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages + * ConnectedEnvironmentDaprComponent. * * @return Resource collection API of ConnectedEnvironmentsDaprComponents. */ @@ -620,6 +633,19 @@ public ContainerAppsPatches containerAppsPatches() { return containerAppsPatches; } + /** + * Gets the resource collection API of ContainerAppsLabelHistories. + * + * @return Resource collection API of ContainerAppsLabelHistories. + */ + public ContainerAppsLabelHistories containerAppsLabelHistories() { + if (this.containerAppsLabelHistories == null) { + this.containerAppsLabelHistories + = new ContainerAppsLabelHistoriesImpl(clientObject.getContainerAppsLabelHistories(), this); + } + return containerAppsLabelHistories; + } + /** * Gets the resource collection API of ContainerAppsRevisions. * @@ -870,7 +896,7 @@ public DaprComponentResiliencyPolicies daprComponentResiliencyPolicies() { } /** - * Gets the resource collection API of DaprComponents. + * Gets the resource collection API of DaprComponents. It manages DaprComponent. * * @return Resource collection API of DaprComponents. */ @@ -893,6 +919,31 @@ public DaprSubscriptions daprSubscriptions() { return daprSubscriptions; } + /** + * Gets the resource collection API of HttpRouteConfigs. It manages HttpRouteConfig. + * + * @return Resource collection API of HttpRouteConfigs. + */ + public HttpRouteConfigs httpRouteConfigs() { + if (this.httpRouteConfigs == null) { + this.httpRouteConfigs = new HttpRouteConfigsImpl(clientObject.getHttpRouteConfigs(), this); + } + return httpRouteConfigs; + } + + /** + * Gets the resource collection API of MaintenanceConfigurations. It manages MaintenanceConfigurationResource. + * + * @return Resource collection API of MaintenanceConfigurations. + */ + public MaintenanceConfigurations maintenanceConfigurations() { + if (this.maintenanceConfigurations == null) { + this.maintenanceConfigurations + = new MaintenanceConfigurationsImpl(clientObject.getMaintenanceConfigurations(), this); + } + return maintenanceConfigurations; + } + /** * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java index b40e6779b5018..518158b45c203 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java @@ -8,7 +8,9 @@ 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.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificatePatch; @@ -77,6 +79,22 @@ Response getWithResponse(String resourceGroupName, String conn @ServiceMethod(returns = ReturnType.SINGLE) CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName); + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateInner> beginCreateOrUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName); + /** * Create or Update a Certificate. * @@ -86,15 +104,14 @@ Response getWithResponse(String resourceGroupName, String conn * @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 com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. + * @return the {@link SyncPoller} for polling of certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, CertificateInner certificateEnvelope, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateInner> beginCreateOrUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, Context context); /** * Create or Update a Certificate. @@ -103,8 +120,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @@ -112,21 +128,21 @@ Response createOrUpdateWithResponse(String resourceGroupName, CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, 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 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 com.azure.core.management.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 Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, - Context context); + CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName, + CertificateInner certificateEnvelope, Context context); /** * Deletes the specified Certificate. @@ -135,13 +151,76 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String certificateName); + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context); + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateInner> beginUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope); + /** * Update properties of a certificate * @@ -153,15 +232,14 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @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 com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. + * @return the {@link SyncPoller} for polling of certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, CertificatePatch certificateEnvelope, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateInner> beginUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, Context context); /** * Update properties of a certificate @@ -173,12 +251,30 @@ Response updateWithResponse(String resourceGroupName, String c * @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 com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope); + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, + CertificatePatch certificateEnvelope, Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java index f0d390ee1103e..08d2793cb5335 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java @@ -8,8 +8,10 @@ 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.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner; import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; /** @@ -28,7 +30,8 @@ public interface ConnectedEnvironmentsDaprComponentsClient { * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); + PagedIterable list(String resourceGroupName, + String connectedEnvironmentName); /** * Get the Dapr Components for a connected environment. @@ -43,7 +46,8 @@ public interface ConnectedEnvironmentsDaprComponentsClient { * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); + PagedIterable list(String resourceGroupName, + String connectedEnvironmentName, Context context); /** * Get a dapr component. @@ -59,8 +63,8 @@ public interface ConnectedEnvironmentsDaprComponentsClient { * @return a dapr component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context); + Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context); /** * Get a dapr component. @@ -75,7 +79,27 @@ Response getWithResponse(String resourceGroupName, String co * @return a dapr component. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName); + ConnectedEnvironmentDaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, + String componentName); + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 dapr Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedEnvironmentDaprComponentInner> + beginCreateOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope); /** * Creates or updates a Dapr Component. @@ -88,14 +112,32 @@ Response getWithResponse(String resourceGroupName, String co * @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 com.azure.core.management.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 dapr Component along with {@link Response}. + * @return the {@link SyncPoller} for polling of dapr Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedEnvironmentDaprComponentInner> + beginCreateOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context); + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context context); + ConnectedEnvironmentDaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String componentName, ConnectedEnvironmentDaprComponentInner daprComponentEnvelope); /** * Creates or updates a Dapr Component. @@ -106,15 +148,32 @@ Response createOrUpdateWithResponse(String resourceGroupName * @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 com.azure.core.management.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 dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, - DaprComponentInner daprComponentEnvelope); + ConnectedEnvironmentDaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String componentName, ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context); + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String componentName); /** * Delete a Dapr Component. @@ -126,14 +185,13 @@ DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvi * @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 com.azure.core.management.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 Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context); /** * Delete a Dapr Component. @@ -144,13 +202,28 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + /** * List secrets for a dapr component. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java index 877de407b477f..f90afb1cd96e8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; @@ -77,6 +79,23 @@ Response getWithResponse(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) ConnectedEnvironmentStorageInner get(String resourceGroupName, String connectedEnvironmentName, String storageName); + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storage resource for connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedEnvironmentStorageInner> beginCreateOrUpdate( + String resourceGroupName, String connectedEnvironmentName, String storageName, + ConnectedEnvironmentStorageInner storageEnvelope); + /** * Create or update storage for a connectedEnvironment. * @@ -86,15 +105,14 @@ Response getWithResponse(String resourceGroupN * @param storageEnvelope Configuration details of storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 storage resource for connectedEnvironment along with {@link Response}. + * @return the {@link SyncPoller} for polling of storage resource for connectedEnvironment. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedEnvironmentStorageInner> beginCreateOrUpdate( + String resourceGroupName, String connectedEnvironmentName, String storageName, + ConnectedEnvironmentStorageInner storageEnvelope, Context context); /** * Create or update storage for a connectedEnvironment. @@ -104,8 +122,7 @@ Response createOrUpdateWithResponse(String res * @param storageName Name of the storage. * @param storageEnvelope Configuration details of storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 storage resource for connectedEnvironment. */ @@ -114,21 +131,21 @@ ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String String storageName, ConnectedEnvironmentStorageInner storageEnvelope); /** - * Delete storage for a connectedEnvironment. + * Create or update storage for a connectedEnvironment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 Response}. + * @return storage resource for connectedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, - Context context); + ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context); /** * Delete storage for a connectedEnvironment. @@ -137,10 +154,54 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String storageName); + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String storageName, Context context); + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java index dafb90840eb0b..984ce0567fcd8 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 @@ -158,6 +158,13 @@ public interface ContainerAppsApiClient { */ ContainerAppsPatchesClient getContainerAppsPatches(); + /** + * Gets the ContainerAppsLabelHistoriesClient object to access its operations. + * + * @return the ContainerAppsLabelHistoriesClient object. + */ + ContainerAppsLabelHistoriesClient getContainerAppsLabelHistories(); + /** * Gets the ContainerAppsRevisionsClient object to access its operations. * @@ -312,6 +319,20 @@ public interface ContainerAppsApiClient { */ DaprSubscriptionsClient getDaprSubscriptions(); + /** + * Gets the HttpRouteConfigsClient object to access its operations. + * + * @return the HttpRouteConfigsClient object. + */ + HttpRouteConfigsClient getHttpRouteConfigs(); + + /** + * Gets the MaintenanceConfigurationsClient object to access its operations. + * + * @return the MaintenanceConfigurationsClient object. + */ + MaintenanceConfigurationsClient getMaintenanceConfigurations(); + /** * Gets the ManagedEnvironmentsStoragesClient object to access its operations. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsLabelHistoriesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsLabelHistoriesClient.java new file mode 100644 index 0000000000000..9c0d3851bafdc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsLabelHistoriesClient.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsLabelHistoriesClient. + */ +public interface ContainerAppsLabelHistoriesClient { + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLabelHistory(String resourceGroupName, String containerAppName); + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLabelHistory(String resourceGroupName, String containerAppName, String filter, + Context context); + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getLabelHistoryWithResponse(String resourceGroupName, String containerAppName, + String labelName, Context context); + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelHistoryInner getLabelHistory(String resourceGroupName, String containerAppName, String labelName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/HttpRouteConfigsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/HttpRouteConfigsClient.java new file mode 100644 index 0000000000000..3f81ce2436e9c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/HttpRouteConfigsClient.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner; + +/** + * An instance of this class provides access to all the operations defined in HttpRouteConfigsClient. + */ +public interface HttpRouteConfigsClient { + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, Context context); + + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HttpRouteConfigInner get(String resourceGroupName, String environmentName, String httpRouteName); + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Http Route config 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 advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope, Context context); + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return advanced Ingress routing for path/header based routing for a Container App Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HttpRouteConfigInner createOrUpdate(String resourceGroupName, String environmentName, String httpRouteName); + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope, Context context); + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HttpRouteConfigInner update(String resourceGroupName, String environmentName, String httpRouteName, + HttpRouteConfigInner httpRouteConfigEnvelope); + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String environmentName, String httpRouteName, + Context context); + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String httpRouteName); + + /** + * Get the Managed Http Routes 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 Http Routes in a given managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Managed Http Routes 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 Http Routes 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/MaintenanceConfigurationsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/MaintenanceConfigurationsClient.java new file mode 100644 index 0000000000000..88f74e0e979bf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/MaintenanceConfigurationsClient.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.MaintenanceConfigurationResourceInner; + +/** + * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. + */ +public interface MaintenanceConfigurationsClient { + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified Managed Environment as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified Managed Environment as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, + Context context); + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, + String environmentName, String configName, + MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope, Context context); + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationResourceInner createOrUpdate(String resourceGroupName, String environmentName, + String configName, MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope); + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown 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 configName, + Context context); + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.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 configName); + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, + String configName, Context context); + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationResourceInner get(String resourceGroupName, String environmentName, String configName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentDaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentDaprComponentInner.java new file mode 100644 index 0000000000000..3a08632192dd6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentDaprComponentInner.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentDaprComponentProperties; +import java.io.IOException; + +/** + * Dapr Component. + */ +@Fluent +public final class ConnectedEnvironmentDaprComponentInner extends ProxyResource { + /* + * Dapr component properties + */ + private ConnectedEnvironmentDaprComponentProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ConnectedEnvironmentDaprComponentInner class. + */ + public ConnectedEnvironmentDaprComponentInner() { + } + + /** + * Get the properties property: Dapr component properties. + * + * @return the properties value. + */ + public ConnectedEnvironmentDaprComponentProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Dapr component properties. + * + * @param properties the properties value to set. + * @return the ConnectedEnvironmentDaprComponentInner object itself. + */ + public ConnectedEnvironmentDaprComponentInner + withProperties(ConnectedEnvironmentDaprComponentProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedEnvironmentDaprComponentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedEnvironmentDaprComponentInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedEnvironmentDaprComponentInner. + */ + public static ConnectedEnvironmentDaprComponentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedEnvironmentDaprComponentInner deserializedConnectedEnvironmentDaprComponentInner + = new ConnectedEnvironmentDaprComponentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentInner.properties + = ConnectedEnvironmentDaprComponentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedEnvironmentDaprComponentInner; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java index 2ea651f923a45..b2cd8c33f72eb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java @@ -19,7 +19,7 @@ * Dapr Component resource specific properties. */ @Fluent -public final class DaprComponentProperties implements JsonSerializable { +public class DaprComponentProperties implements JsonSerializable { /* * Component type */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRouteConfigInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRouteConfigInner.java new file mode 100644 index 0000000000000..b3efd28244858 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRouteConfigInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigProperties; +import java.io.IOException; + +/** + * Advanced Ingress routing for path/header based routing for a Container App Environment. + */ +@Fluent +public final class HttpRouteConfigInner extends ProxyResource { + /* + * Http Route Config properties + */ + private HttpRouteConfigProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of HttpRouteConfigInner class. + */ + public HttpRouteConfigInner() { + } + + /** + * Get the properties property: Http Route Config properties. + * + * @return the properties value. + */ + public HttpRouteConfigProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Http Route Config properties. + * + * @param properties the properties value to set. + * @return the HttpRouteConfigInner object itself. + */ + public HttpRouteConfigInner withProperties(HttpRouteConfigProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteConfigInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteConfigInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HttpRouteConfigInner. + */ + public static HttpRouteConfigInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteConfigInner deserializedHttpRouteConfigInner = new HttpRouteConfigInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedHttpRouteConfigInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedHttpRouteConfigInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedHttpRouteConfigInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedHttpRouteConfigInner.properties = HttpRouteConfigProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedHttpRouteConfigInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteConfigInner; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LabelHistoryInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LabelHistoryInner.java new file mode 100644 index 0000000000000..ded9b09209dff --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LabelHistoryInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.models.LabelHistoryProperties; +import java.io.IOException; + +/** + * Container App Label History. + */ +@Fluent +public final class LabelHistoryInner extends ProxyResource { + /* + * Container App Label History resource specific properties + */ + private LabelHistoryProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LabelHistoryInner class. + */ + public LabelHistoryInner() { + } + + /** + * Get the properties property: Container App Label History resource specific properties. + * + * @return the properties value. + */ + public LabelHistoryProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Container App Label History resource specific properties. + * + * @param properties the properties value to set. + * @return the LabelHistoryInner object itself. + */ + public LabelHistoryInner withProperties(LabelHistoryProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelHistoryInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelHistoryInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LabelHistoryInner. + */ + public static LabelHistoryInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelHistoryInner deserializedLabelHistoryInner = new LabelHistoryInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLabelHistoryInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLabelHistoryInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLabelHistoryInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLabelHistoryInner.properties = LabelHistoryProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLabelHistoryInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLabelHistoryInner; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/MaintenanceConfigurationResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/MaintenanceConfigurationResourceInner.java new file mode 100644 index 0000000000000..38c3546098cea --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/MaintenanceConfigurationResourceInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.models.ScheduledEntry; +import java.io.IOException; +import java.util.List; + +/** + * Information about the Maintenance Configuration resource. + */ +@Fluent +public final class MaintenanceConfigurationResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ScheduledEntries innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceConfigurationResourceInner class. + */ + public MaintenanceConfigurationResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ScheduledEntries innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the scheduledEntries property: List of maintenance schedules for a managed environment. + * + * @return the scheduledEntries value. + */ + public List scheduledEntries() { + return this.innerProperties() == null ? null : this.innerProperties().scheduledEntries(); + } + + /** + * Set the scheduledEntries property: List of maintenance schedules for a managed environment. + * + * @param scheduledEntries the scheduledEntries value to set. + * @return the MaintenanceConfigurationResourceInner object itself. + */ + public MaintenanceConfigurationResourceInner withScheduledEntries(List scheduledEntries) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledEntries(); + } + this.innerProperties().withScheduledEntries(scheduledEntries); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceConfigurationResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceConfigurationResourceInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceConfigurationResourceInner. + */ + public static MaintenanceConfigurationResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceConfigurationResourceInner deserializedMaintenanceConfigurationResourceInner + = new MaintenanceConfigurationResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceConfigurationResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceConfigurationResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceConfigurationResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceConfigurationResourceInner.innerProperties + = ScheduledEntries.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMaintenanceConfigurationResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceConfigurationResourceInner; + }); + } +} 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 3bee1a560a9a3..7f21564700a98 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 @@ -388,6 +388,29 @@ public ManagedEnvironmentInner withZoneRedundant(Boolean zoneRedundant) { return this; } + /** + * Get the availabilityZones property: The list of availability zones to use for managed environment. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZones(); + } + + /** + * Set the availabilityZones property: The list of availability zones to use for managed environment. + * + * @param availabilityZones the availabilityZones value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withAvailabilityZones(List availabilityZones) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withAvailabilityZones(availabilityZones); + return this; + } + /** * Get the customDomainConfiguration property: Custom domain configuration for the environment. * 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 a2f8451b0f7f4..1de528cb39724 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 @@ -86,6 +86,11 @@ public final class ManagedEnvironmentProperties implements JsonSerializable availabilityZones; + /* * Custom domain configuration for the environment */ @@ -329,6 +334,26 @@ public ManagedEnvironmentProperties withZoneRedundant(Boolean zoneRedundant) { return this; } + /** + * Get the availabilityZones property: The list of availability zones to use for managed environment. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set the availabilityZones property: The list of availability zones to use for managed environment. + * + * @param availabilityZones the availabilityZones value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withAvailabilityZones(List availabilityZones) { + this.availabilityZones = availabilityZones; + return this; + } + /** * Get the customDomainConfiguration property: Custom domain configuration for the environment. * @@ -570,6 +595,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("appInsightsConfiguration", this.appInsightsConfiguration); jsonWriter.writeJsonField("openTelemetryConfiguration", this.openTelemetryConfiguration); jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); + jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, + (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("customDomainConfiguration", this.customDomainConfiguration); jsonWriter.writeArrayField("workloadProfiles", this.workloadProfiles, (writer, element) -> writer.writeJson(element)); @@ -624,6 +651,9 @@ public static ManagedEnvironmentProperties fromJson(JsonReader jsonReader) throw = OpenTelemetryConfiguration.fromJson(reader); } else if ("zoneRedundant".equals(fieldName)) { deserializedManagedEnvironmentProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("availabilityZones".equals(fieldName)) { + List availabilityZones = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedEnvironmentProperties.availabilityZones = availabilityZones; } else if ("customDomainConfiguration".equals(fieldName)) { deserializedManagedEnvironmentProperties.customDomainConfiguration = CustomDomainConfiguration.fromJson(reader); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java index 7e1d14ba2e140..ea08945a4b08c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.appcontainers.models.Template; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.List; /** * Container App Revision. @@ -168,6 +169,15 @@ public Integer trafficWeight() { return this.innerProperties() == null ? null : this.innerProperties().trafficWeight(); } + /** + * Get the labels property: List of labels assigned to this revision. + * + * @return the labels value. + */ + public List labels() { + return this.innerProperties() == null ? null : this.innerProperties().labels(); + } + /** * Get the provisioningError property: Optional Field - Platform Error Message. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java index 29f8e0525ebb7..355ef71deb210 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.appcontainers.models.Template; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.List; /** * Revision resource specific properties. @@ -60,6 +61,11 @@ public final class RevisionProperties implements JsonSerializable labels; + /* * Optional Field - Platform Error Message */ @@ -153,6 +159,15 @@ public Integer trafficWeight() { return this.trafficWeight; } + /** + * Get the labels property: List of labels assigned to this revision. + * + * @return the labels value. + */ + public List labels() { + return this.labels; + } + /** * Get the provisioningError property: Optional Field - Platform Error Message. * @@ -240,6 +255,9 @@ public static RevisionProperties fromJson(JsonReader jsonReader) throws IOExcept deserializedRevisionProperties.replicas = reader.getNullable(JsonReader::getInt); } else if ("trafficWeight".equals(fieldName)) { deserializedRevisionProperties.trafficWeight = reader.getNullable(JsonReader::getInt); + } else if ("labels".equals(fieldName)) { + List labels = reader.readArray(reader1 -> reader1.getString()); + deserializedRevisionProperties.labels = labels; } else if ("provisioningError".equals(fieldName)) { deserializedRevisionProperties.provisioningError = reader.getString(); } else if ("healthState".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ScheduledEntries.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ScheduledEntries.java new file mode 100644 index 0000000000000..1eaf540e78fbd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ScheduledEntries.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.models.ScheduledEntry; +import java.io.IOException; +import java.util.List; + +/** + * List of maintenance schedules for a managed environment. + */ +@Fluent +public final class ScheduledEntries implements JsonSerializable { + /* + * List of maintenance schedules for a managed environment. + */ + private List scheduledEntries; + + /** + * Creates an instance of ScheduledEntries class. + */ + public ScheduledEntries() { + } + + /** + * Get the scheduledEntries property: List of maintenance schedules for a managed environment. + * + * @return the scheduledEntries value. + */ + public List scheduledEntries() { + return this.scheduledEntries; + } + + /** + * Set the scheduledEntries property: List of maintenance schedules for a managed environment. + * + * @param scheduledEntries the scheduledEntries value to set. + * @return the ScheduledEntries object itself. + */ + public ScheduledEntries withScheduledEntries(List scheduledEntries) { + this.scheduledEntries = scheduledEntries; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scheduledEntries() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property scheduledEntries in model ScheduledEntries")); + } else { + scheduledEntries().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduledEntries.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("scheduledEntries", this.scheduledEntries, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledEntries from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledEntries if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScheduledEntries. + */ + public static ScheduledEntries fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledEntries deserializedScheduledEntries = new ScheduledEntries(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scheduledEntries".equals(fieldName)) { + List scheduledEntries + = reader.readArray(reader1 -> ScheduledEntry.fromJson(reader1)); + deserializedScheduledEntries.scheduledEntries = scheduledEntries; + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledEntries; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java index a75e266bb165c..776eb3e25bcd1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java @@ -13,6 +13,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityAutoGenerated; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; @@ -27,6 +29,12 @@ */ @Fluent public final class SessionPoolInner extends Resource { + /* + * Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or + * credentials in code. + */ + private ManagedServiceIdentityAutoGenerated identity; + /* * Container App session pool resource specific properties */ @@ -58,6 +66,28 @@ public final class SessionPoolInner extends Resource { public SessionPoolInner() { } + /** + * Get the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @return the identity value. + */ + public ManagedServiceIdentityAutoGenerated identity() { + return this.identity; + } + + /** + * Set the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @param identity the identity value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withIdentity(ManagedServiceIdentityAutoGenerated identity) { + this.identity = identity; + return this; + } + /** * Get the innerProperties property: Container App session pool resource specific properties. * @@ -337,12 +367,40 @@ public SessionPoolProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @return the managedIdentitySettings value. + */ + public List managedIdentitySettings() { + return this.innerProperties() == null ? null : this.innerProperties().managedIdentitySettings(); + } + + /** + * Set the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @param managedIdentitySettings the managedIdentitySettings value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withManagedIdentitySettings(List managedIdentitySettings) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withManagedIdentitySettings(managedIdentitySettings); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } @@ -356,6 +414,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -387,6 +446,8 @@ public static SessionPoolInner fromJson(JsonReader jsonReader) throws IOExceptio } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedSessionPoolInner.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedSessionPoolInner.identity = ManagedServiceIdentityAutoGenerated.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedSessionPoolInner.innerProperties = SessionPoolProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java index 02214a703a37b..b32bd41995dc4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; @@ -80,6 +81,11 @@ public final class SessionPoolProperties implements JsonSerializable managedIdentitySettings; + /** * Creates an instance of SessionPoolProperties class. */ @@ -276,6 +282,28 @@ public SessionPoolProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @return the managedIdentitySettings value. + */ + public List managedIdentitySettings() { + return this.managedIdentitySettings; + } + + /** + * Set the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @param managedIdentitySettings the managedIdentitySettings value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withManagedIdentitySettings(List managedIdentitySettings) { + this.managedIdentitySettings = managedIdentitySettings; + return this; + } + /** * Validates the instance. * @@ -297,6 +325,9 @@ public void validate() { if (sessionNetworkConfiguration() != null) { sessionNetworkConfiguration().validate(); } + if (managedIdentitySettings() != null) { + managedIdentitySettings().forEach(e -> e.validate()); + } } /** @@ -314,6 +345,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("dynamicPoolConfiguration", this.dynamicPoolConfiguration); jsonWriter.writeJsonField("customContainerTemplate", this.customContainerTemplate); jsonWriter.writeJsonField("sessionNetworkConfiguration", this.sessionNetworkConfiguration); + jsonWriter.writeArrayField("managedIdentitySettings", this.managedIdentitySettings, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -360,6 +393,10 @@ public static SessionPoolProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("provisioningState".equals(fieldName)) { deserializedSessionPoolProperties.provisioningState = SessionPoolProvisioningState.fromString(reader.getString()); + } else if ("managedIdentitySettings".equals(fieldName)) { + List managedIdentitySettings + = reader.readArray(reader1 -> ManagedIdentitySetting.fromJson(reader1)); + deserializedSessionPoolProperties.managedIdentitySettings = managedIdentitySettings; } else { reader.skipChildren(); } 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 7f84f8f2426b2..c82efd850e8f1 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 @@ -89,18 +89,15 @@ public CertificateImpl withExistingConnectedEnvironment(String resourceGroupName public Certificate create() { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsCertificates() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), - Context.NONE) - .getValue(); + .createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), + Context.NONE); return this; } public Certificate create(Context context) { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsCertificates() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), - context) - .getValue(); + .createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), context); return this; } @@ -118,18 +115,15 @@ public CertificateImpl update() { public Certificate apply() { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsCertificates() - .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, - Context.NONE) - .getValue(); + .update(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, + Context.NONE); return this; } public Certificate apply(Context context) { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsCertificates() - .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, - context) - .getValue(); + .update(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, context); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentDaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentDaprComponentImpl.java new file mode 100644 index 0000000000000..38280786752b7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentDaprComponentImpl.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentDaprComponent; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentDaprComponentProperties; +import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; + +public final class ConnectedEnvironmentDaprComponentImpl implements ConnectedEnvironmentDaprComponent, + ConnectedEnvironmentDaprComponent.Definition, ConnectedEnvironmentDaprComponent.Update { + private ConnectedEnvironmentDaprComponentInner 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 ConnectedEnvironmentDaprComponentProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ConnectedEnvironmentDaprComponentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String connectedEnvironmentName; + + private String componentName; + + public ConnectedEnvironmentDaprComponentImpl withExistingConnectedEnvironment(String resourceGroupName, + String connectedEnvironmentName) { + this.resourceGroupName = resourceGroupName; + this.connectedEnvironmentName = connectedEnvironmentName; + return this; + } + + public ConnectedEnvironmentDaprComponent create() { + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + Context.NONE); + return this; + } + + public ConnectedEnvironmentDaprComponent create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context); + return this; + } + + ConnectedEnvironmentDaprComponentImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new ConnectedEnvironmentDaprComponentInner(); + this.serviceManager = serviceManager; + this.componentName = name; + } + + public ConnectedEnvironmentDaprComponentImpl update() { + return this; + } + + public ConnectedEnvironmentDaprComponent apply() { + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + Context.NONE); + return this; + } + + public ConnectedEnvironmentDaprComponent apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context); + return this; + } + + ConnectedEnvironmentDaprComponentImpl(ConnectedEnvironmentDaprComponentInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.connectedEnvironmentName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); + } + + public ConnectedEnvironmentDaprComponent refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + .getValue(); + return this; + } + + public ConnectedEnvironmentDaprComponent refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context) + .getValue(); + return this; + } + + public Response listSecretsWithResponse(Context context) { + return serviceManager.connectedEnvironmentsDaprComponents() + .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + + public DaprSecretsCollection listSecrets() { + return serviceManager.connectedEnvironmentsDaprComponents() + .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); + } + + public ConnectedEnvironmentDaprComponentImpl + withProperties(ConnectedEnvironmentDaprComponentProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java index 9b485850e2741..4c60f0891fc0d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java @@ -64,18 +64,14 @@ public ConnectedEnvironmentStorageImpl withExistingConnectedEnvironment(String r public ConnectedEnvironmentStorage create() { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), - Context.NONE) - .getValue(); + .createOrUpdate(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE); return this; } public ConnectedEnvironmentStorage create(Context context) { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), - context) - .getValue(); + .createOrUpdate(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context); return this; } @@ -93,18 +89,14 @@ public ConnectedEnvironmentStorageImpl update() { public ConnectedEnvironmentStorage apply() { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), - Context.NONE) - .getValue(); + .createOrUpdate(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE); return this; } public ConnectedEnvironmentStorage apply(Context context) { this.innerObject = serviceManager.serviceClient() .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), - context) - .getValue(); + .createOrUpdate(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context); return this; } 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 9e35fe01415c9..1d040b3bb1f79 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 @@ -26,13 +26,19 @@ 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.ConnectedEnvironmentsCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateCollection; import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -90,9 +96,9 @@ Mono> get(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -102,9 +108,9 @@ Mono> createOrUpdate(@HostParam("$host") String endpo @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -113,9 +119,9 @@ Mono> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -419,13 +425,13 @@ public CertificateInner get(String resourceGroupName, String connectedEnvironmen * @param certificateName Name of the Certificate. * @param certificateEnvelope Certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -467,13 +473,13 @@ private Mono> createOrUpdateWithResponseAsync(String * @param certificateEnvelope Certificate to be created or updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { @@ -512,8 +518,143 @@ private Mono> createOrUpdateWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, String connectedEnvironmentName, String certificateName, + CertificateInner certificateEnvelope) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, certificateName, certificateEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CertificateInner.class, CertificateInner.class, this.client.getContext()); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CertificateInner> + beginCreateOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName) { + final CertificateInner certificateEnvelope = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, certificateName, certificateEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CertificateInner.class, CertificateInner.class, this.client.getContext()); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, String connectedEnvironmentName, String certificateName, + CertificateInner certificateEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, certificateName, certificateEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CertificateInner.class, CertificateInner.class, context); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CertificateInner> beginCreateOrUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName) { + final CertificateInner certificateEnvelope = null; + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) + .getSyncPoller(); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CertificateInner> beginCreateOrUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, + context) + .getSyncPoller(); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificateInner certificateEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful * completion of {@link Mono}. @@ -522,8 +663,8 @@ private Mono> createOrUpdateWithResponseAsync(String private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName) { final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -535,17 +676,16 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str * @param certificateEnvelope Certificate to be created or updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope, context).block(); + private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificateInner certificateEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -555,7 +695,7 @@ public Response createOrUpdateWithResponse(String resourceGrou * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException 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. */ @@ -563,8 +703,28 @@ public Response createOrUpdateWithResponse(String resourceGrou public CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName) { final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope, Context.NONE).getValue(); + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) + .block(); + } + + /** + * Create or Update a Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificateInner certificateEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, + context).block(); } /** @@ -574,13 +734,13 @@ public CertificateInner createOrUpdate(String resourceGroupName, String connecte * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, - String certificateName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -617,13 +777,13 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param certificateName Name of the Certificate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -657,14 +817,92 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String certificateName) { + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, certificateName).getSyncPoller(); + } + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context) { + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, certificateName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) - .flatMap(ignored -> Mono.empty()); + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, certificateName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -675,14 +913,15 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron * @param certificateName Name of the Certificate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); + private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, + Context context) { + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -692,12 +931,29 @@ public Response deleteWithResponse(String resourceGroupName, String connec * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); + deleteAsync(resourceGroupName, connectedEnvironmentName, certificateName).block(); + } + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName, + Context context) { + deleteAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); } /** @@ -710,13 +966,13 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St * @param certificateName Name of the Certificate. * @param certificateEnvelope Properties of a certificate that need to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -763,13 +1019,13 @@ private Mono> updateWithResponseAsync(String resource * @param certificateEnvelope Properties of a certificate that need to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { @@ -815,7 +1071,106 @@ private Mono> updateWithResponseAsync(String resource * @param certificateName Name of the Certificate. * @param certificateEnvelope Properties of a certificate that need to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CertificateInner> beginUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, + certificateName, certificateEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CertificateInner.class, CertificateInner.class, this.client.getContext()); + } + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CertificateInner> beginUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, + certificateName, certificateEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CertificateInner.class, CertificateInner.class, context); + } + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CertificateInner> beginUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { + return this.beginUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) + .getSyncPoller(); + } + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 certificate used for Custom Domain bindings of Container Apps in a + * Managed Environment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CertificateInner> beginUpdate(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, + context) + .getSyncPoller(); + } + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful * completion of {@link Mono}. @@ -823,8 +1178,9 @@ private Mono> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -838,16 +1194,16 @@ private Mono updateAsync(String resourceGroupName, String conn * @param certificateEnvelope Properties of a certificate that need to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, + private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, Context context) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope, context).block(); + return beginUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -860,15 +1216,36 @@ public Response updateWithResponse(String resourceGroupName, S * @param certificateName Name of the Certificate. * @param certificateEnvelope Properties of a certificate that need to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) public CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { - return updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, - Context.NONE).getValue(); + return updateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope).block(); + } + + /** + * Update properties of a certificate + * + * Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, + CertificatePatch certificateEnvelope, Context context) { + return updateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context) + .block(); } /** 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 bbe34b1865dd2..cb5215fbc180b 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 @@ -59,16 +59,15 @@ public Certificate get(String resourceGroupName, String connectedEnvironmentName } } - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); - } - public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); } + public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName, + Context context) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName, context); + } + public Certificate getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -124,10 +123,10 @@ public void deleteById(String id) { 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); + this.delete(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -143,7 +142,7 @@ public Response deleteByIdWithResponse(String id, Context context) { 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); + this.delete(resourceGroupName, connectedEnvironmentName, certificateName, context); } private ConnectedEnvironmentsCertificatesClient serviceClient() { 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 72cf1b79d7471..461f9d21f48ac 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 @@ -26,13 +26,19 @@ 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.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner; import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentDaprComponentsCollection; import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -71,7 +77,7 @@ public interface ConnectedEnvironmentsDaprComponentsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -81,7 +87,7 @@ Mono> list(@HostParam("$host") String endpoin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -90,21 +96,21 @@ Mono> get(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, + @BodyParam("application/json") ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -126,7 +132,7 @@ Mono> listSecrets(@HostParam("$host") Strin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -143,7 +149,7 @@ Mono> listNext( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, + private Mono> listSinglePageAsync(String resourceGroupName, String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -165,7 +171,7 @@ private Mono> listSinglePageAsync(String resou return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>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())); } @@ -183,7 +189,7 @@ private Mono> listSinglePageAsync(String resou * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, + private Mono> listSinglePageAsync(String resourceGroupName, String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -221,7 +227,8 @@ private Mono> listSinglePageAsync(String resou * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { + private PagedFlux listAsync(String resourceGroupName, + String connectedEnvironmentName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -238,8 +245,8 @@ private PagedFlux listAsync(String resourceGroupName, String * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName, - Context context) { + private PagedFlux listAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -255,7 +262,8 @@ private PagedFlux listAsync(String resourceGroupName, String * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { + public PagedIterable list(String resourceGroupName, + String connectedEnvironmentName) { return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); } @@ -271,8 +279,8 @@ public PagedIterable list(String resourceGroupName, String c * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, - Context context) { + public PagedIterable list(String resourceGroupName, + String connectedEnvironmentName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); } @@ -288,7 +296,7 @@ public PagedIterable list(String resourceGroupName, String c * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, + private Mono> getWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String componentName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -330,7 +338,7 @@ private Mono> getWithResponseAsync(String resourceG * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, + private Mono> getWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -369,8 +377,8 @@ private Mono> getWithResponseAsync(String resourceG * @return a dapr component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName) { + private Mono getAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -388,8 +396,8 @@ private Mono getAsync(String resourceGroupName, String conne * @return a dapr component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { + public Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); } @@ -405,7 +413,8 @@ public Response getWithResponse(String resourceGroupName, St * @return a dapr component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName) { + public ConnectedEnvironmentDaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, + String componentName) { return getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE).getValue(); } @@ -419,13 +428,14 @@ public DaprComponentInner get(String resourceGroupName, String connectedEnvironm * @param componentName Name of the Dapr Component. * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -470,14 +480,14 @@ private Mono> createOrUpdateWithResponseAsync(Strin * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -520,15 +530,116 @@ private Mono> createOrUpdateWithResponseAsync(Strin * @param componentName Name of the Dapr Component. * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 dapr Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedEnvironmentDaprComponentInner> + beginCreateOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, componentName, daprComponentEnvelope); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ConnectedEnvironmentDaprComponentInner.class, + ConnectedEnvironmentDaprComponentInner.class, this.client.getContext()); + } + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 dapr Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedEnvironmentDaprComponentInner> + beginCreateOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, componentName, daprComponentEnvelope, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ConnectedEnvironmentDaprComponentInner.class, + ConnectedEnvironmentDaprComponentInner.class, context); + } + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 dapr Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedEnvironmentDaprComponentInner> + beginCreateOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope) + .getSyncPoller(); + } + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 dapr Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedEnvironmentDaprComponentInner> + beginCreateOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, + context) + .getSyncPoller(); + } + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr Component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName, DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, - daprComponentEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, + daprComponentEnvelope).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -542,16 +653,16 @@ private Mono createOrUpdateAsync(String resourceGroupName, S * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException 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 dapr Component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, - daprComponentEnvelope, context).block(); + private Mono createOrUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, + daprComponentEnvelope, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -564,15 +675,39 @@ public Response createOrUpdateWithResponse(String resourceGr * @param componentName Name of the Dapr Component. * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentDaprComponentInner createOrUpdate(String resourceGroupName, + String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope) { + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope) + .block(); + } + + /** + * Creates or updates a Dapr Component. + * + * Creates or updates a Dapr Component in a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - String componentName, DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, - daprComponentEnvelope, Context.NONE).getValue(); + public ConnectedEnvironmentDaprComponentInner createOrUpdate(String resourceGroupName, + String connectedEnvironmentName, String componentName, + ConnectedEnvironmentDaprComponentInner daprComponentEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, + context).block(); } /** @@ -584,13 +719,13 @@ public DaprComponentInner createOrUpdate(String resourceGroupName, String connec * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -628,13 +763,13 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -669,14 +804,100 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String componentName) { + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, componentName).getSyncPoller(); + } + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, componentName, context) + .getSyncPoller(); + } + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, String componentName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(ignored -> Mono.empty()); + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, componentName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -689,14 +910,15 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); + private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, String componentName, + Context context) { + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, componentName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -708,12 +930,31 @@ public Response deleteWithResponse(String resourceGroupName, String connec * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); + deleteAsync(resourceGroupName, connectedEnvironmentName, componentName).block(); + } + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a connected environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName, + Context context) { + deleteAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); } /** @@ -861,10 +1102,11 @@ public DaprSecretsCollectionInner listSecrets(String resourceGroupName, String c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return collection of Dapr Components for Environments along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -874,7 +1116,7 @@ private Mono> listNextSinglePageAsync(String n } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>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())); } @@ -887,10 +1129,12 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return collection of Dapr Components for Environments along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java index 81cb2b05c3e1f..81625e84e20b5 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 @@ -10,10 +10,10 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner; import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentDaprComponent; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; public final class ConnectedEnvironmentsDaprComponentsImpl implements ConnectedEnvironmentsDaprComponents { @@ -29,50 +29,54 @@ public ConnectedEnvironmentsDaprComponentsImpl(ConnectedEnvironmentsDaprComponen this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - PagedIterable inner + public PagedIterable list(String resourceGroupName, + String connectedEnvironmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ConnectedEnvironmentDaprComponentImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, - Context context) { - PagedIterable inner + public PagedIterable list(String resourceGroupName, + String connectedEnvironmentName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ConnectedEnvironmentDaprComponentImpl(inner1, this.manager())); } - public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - Response inner + public Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); + new ConnectedEnvironmentDaprComponentImpl(inner.getValue(), this.manager())); } else { return null; } } - public DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName) { - DaprComponentInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, componentName); + public ConnectedEnvironmentDaprComponent get(String resourceGroupName, String connectedEnvironmentName, + String componentName) { + ConnectedEnvironmentDaprComponentInner inner + = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, componentName); if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); + return new ConnectedEnvironmentDaprComponentImpl(inner, this.manager()); } else { return null; } } - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - } - public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); } + public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName, + Context context) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName, context); + } + public Response listSecretsWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { Response inner = this.serviceClient() @@ -96,7 +100,7 @@ public DaprSecretsCollection listSecrets(String resourceGroupName, String connec } } - public DaprComponent getById(String id) { + public ConnectedEnvironmentDaprComponent getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -116,7 +120,7 @@ public DaprComponent getById(String id) { .getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -151,10 +155,10 @@ public void deleteById(String id) { 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); + this.delete(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -170,7 +174,7 @@ public Response deleteByIdWithResponse(String id, Context context) { 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); + this.delete(resourceGroupName, connectedEnvironmentName, componentName, context); } private ConnectedEnvironmentsDaprComponentsClient serviceClient() { @@ -181,7 +185,7 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( return this.serviceManager; } - public DaprComponentImpl define(String name) { - return new DaprComponentImpl(name, this.manager()); + public ConnectedEnvironmentDaprComponentImpl define(String name) { + return new ConnectedEnvironmentDaprComponentImpl(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 313d8933511ab..0dce9d8686f2b 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 @@ -21,12 +21,18 @@ import com.azure.core.annotation.UnexpectedResponseExceptionType; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -84,9 +90,9 @@ Mono> get(@HostParam("$host") String @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -96,9 +102,9 @@ Mono> createOrUpdate(@HostParam("$hos @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @@ -370,13 +376,13 @@ public ConnectedEnvironmentStorageInner get(String resourceGroupName, String con * @param storageName Name of the storage. * @param storageEnvelope Configuration details of storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for connectedEnvironment along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -420,13 +426,13 @@ private Mono> createOrUpdateWithRespo * @param storageEnvelope Configuration details of storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for connectedEnvironment along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context) { if (this.client.getEndpoint() == null) { @@ -468,15 +474,107 @@ private Mono> createOrUpdateWithRespo * @param storageName Name of the storage. * @param storageEnvelope Configuration details of storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 storage resource for connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedEnvironmentStorageInner> + beginCreateOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, + ConnectedEnvironmentStorageInner storageEnvelope) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, storageName, storageEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedEnvironmentStorageInner.class, + ConnectedEnvironmentStorageInner.class, this.client.getContext()); + } + + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 storage resource for connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedEnvironmentStorageInner> + beginCreateOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, + ConnectedEnvironmentStorageInner storageEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, storageName, storageEnvelope, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedEnvironmentStorageInner.class, + ConnectedEnvironmentStorageInner.class, context); + } + + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 storage resource for connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedEnvironmentStorageInner> + beginCreateOrUpdate(String resourceGroupName, String connectedEnvironmentName, String storageName, + ConnectedEnvironmentStorageInner storageEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope) + .getSyncPoller(); + } + + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 storage resource for connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedEnvironmentStorageInner> + beginCreateOrUpdate(String resourceGroupName, String connectedEnvironmentName, String storageName, + ConnectedEnvironmentStorageInner storageEnvelope, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, + context) + .getSyncPoller(); + } + + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for connectedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, - storageEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -488,16 +586,16 @@ private Mono createOrUpdateAsync(String resour * @param storageEnvelope Configuration details of storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment along with {@link Response}. + * @return storage resource for connectedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, + private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, - storageEnvelope, context).block(); + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -508,15 +606,34 @@ public Response createOrUpdateWithResponse(Str * @param storageName Name of the storage. * @param storageEnvelope Configuration details of storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for connectedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, - Context.NONE).getValue(); + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope).block(); + } + + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return storage resource for connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, context) + .block(); } /** @@ -526,13 +643,13 @@ public ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, - String storageName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -567,13 +684,13 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param storageName Name of the storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, - String storageName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -606,14 +723,91 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String storageName) { + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, storageName).getSyncPoller(); + } + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + String storageName, Context context) { + return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, storageName, context).getSyncPoller(); + } + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, String storageName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) - .flatMap(ignored -> Mono.empty()); + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, storageName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -624,14 +818,15 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron * @param storageName Name of the storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown 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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String storageName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); + private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, String storageName, + Context context) { + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, storageName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -641,11 +836,27 @@ public Response deleteWithResponse(String resourceGroupName, String connec * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); + deleteAsync(resourceGroupName, connectedEnvironmentName, storageName).block(); + } + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + deleteAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java index d8920cd356254..ee606ea30d785 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java @@ -73,16 +73,14 @@ public ConnectedEnvironmentStorage get(String resourceGroupName, String connecte } } - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String storageName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - } - public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName); } + public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName, context); + } + public ConnectedEnvironmentStorage getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -137,10 +135,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } - this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); + this.delete(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -156,7 +154,7 @@ public Response deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } - return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + this.delete(resourceGroupName, connectedEnvironmentName, storageName, context); } private ConnectedEnvironmentsStoragesClient serviceClient() { 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 761f220fb8218..e1df519fc4a69 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 @@ -41,6 +41,7 @@ import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsLabelHistoriesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; @@ -51,10 +52,12 @@ import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.fluent.HttpRouteConfigsClient; import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient; import com.azure.resourcemanager.appcontainers.fluent.LogicAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.MaintenanceConfigurationsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateEndpointConnectionsClient; @@ -389,6 +392,20 @@ public ContainerAppsPatchesClient getContainerAppsPatches() { return this.containerAppsPatches; } + /** + * The ContainerAppsLabelHistoriesClient object to access its operations. + */ + private final ContainerAppsLabelHistoriesClient containerAppsLabelHistories; + + /** + * Gets the ContainerAppsLabelHistoriesClient object to access its operations. + * + * @return the ContainerAppsLabelHistoriesClient object. + */ + public ContainerAppsLabelHistoriesClient getContainerAppsLabelHistories() { + return this.containerAppsLabelHistories; + } + /** * The ContainerAppsRevisionsClient object to access its operations. */ @@ -697,6 +714,34 @@ public DaprSubscriptionsClient getDaprSubscriptions() { return this.daprSubscriptions; } + /** + * The HttpRouteConfigsClient object to access its operations. + */ + private final HttpRouteConfigsClient httpRouteConfigs; + + /** + * Gets the HttpRouteConfigsClient object to access its operations. + * + * @return the HttpRouteConfigsClient object. + */ + public HttpRouteConfigsClient getHttpRouteConfigs() { + return this.httpRouteConfigs; + } + + /** + * The MaintenanceConfigurationsClient object to access its operations. + */ + private final MaintenanceConfigurationsClient maintenanceConfigurations; + + /** + * Gets the MaintenanceConfigurationsClient object to access its operations. + * + * @return the MaintenanceConfigurationsClient object. + */ + public MaintenanceConfigurationsClient getMaintenanceConfigurations() { + return this.maintenanceConfigurations; + } + /** * The ManagedEnvironmentsStoragesClient object to access its operations. */ @@ -784,7 +829,7 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-08-02-preview"; + this.apiVersion = "2024-10-02-preview"; this.appResiliencies = new AppResilienciesClientImpl(this); this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); @@ -801,6 +846,7 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsClientImpl(this); this.containerAppsBuilds = new ContainerAppsBuildsClientImpl(this); this.containerAppsPatches = new ContainerAppsPatchesClientImpl(this); + this.containerAppsLabelHistories = new ContainerAppsLabelHistoriesClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); @@ -824,6 +870,8 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { this.daprComponentResiliencyPolicies = new DaprComponentResiliencyPoliciesClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); this.daprSubscriptions = new DaprSubscriptionsClientImpl(this); + this.httpRouteConfigs = new HttpRouteConfigsClientImpl(this); + this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); this.containerAppsSessionPools = new ContainerAppsSessionPoolsClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsLabelHistoriesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsLabelHistoriesClientImpl.java new file mode 100644 index 0000000000000..54f912dd4068c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsLabelHistoriesClientImpl.java @@ -0,0 +1,450 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsLabelHistoriesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.LabelHistoryCollection; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsLabelHistoriesClient. + */ +public final class ContainerAppsLabelHistoriesClientImpl implements ContainerAppsLabelHistoriesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsLabelHistoriesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsLabelHistoriesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsLabelHistoriesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsLabelHistoriesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsLabelHistories to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsLabelHistoriesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listLabelHistory(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getLabelHistory(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("labelName") String labelName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listLabelHistoryNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLabelHistorySinglePageAsync(String resourceGroupName, + String containerAppName, String filter) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listLabelHistory(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLabelHistorySinglePageAsync(String resourceGroupName, + String containerAppName, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listLabelHistory(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLabelHistoryAsync(String resourceGroupName, String containerAppName, + String filter) { + return new PagedFlux<>(() -> listLabelHistorySinglePageAsync(resourceGroupName, containerAppName, filter), + nextLink -> listLabelHistoryNextSinglePageAsync(nextLink)); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLabelHistoryAsync(String resourceGroupName, String containerAppName) { + final String filter = null; + return new PagedFlux<>(() -> listLabelHistorySinglePageAsync(resourceGroupName, containerAppName, filter), + nextLink -> listLabelHistoryNextSinglePageAsync(nextLink)); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLabelHistoryAsync(String resourceGroupName, String containerAppName, + String filter, Context context) { + return new PagedFlux<>( + () -> listLabelHistorySinglePageAsync(resourceGroupName, containerAppName, filter, context), + nextLink -> listLabelHistoryNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listLabelHistory(String resourceGroupName, String containerAppName) { + final String filter = null; + return new PagedIterable<>(listLabelHistoryAsync(resourceGroupName, containerAppName, filter)); + } + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listLabelHistory(String resourceGroupName, String containerAppName, + String filter, Context context) { + return new PagedIterable<>(listLabelHistoryAsync(resourceGroupName, containerAppName, filter, context)); + } + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getLabelHistoryWithResponseAsync(String resourceGroupName, + String containerAppName, String labelName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (labelName == null) { + return Mono.error(new IllegalArgumentException("Parameter labelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getLabelHistory(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, labelName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getLabelHistoryWithResponseAsync(String resourceGroupName, + String containerAppName, String labelName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (labelName == null) { + return Mono.error(new IllegalArgumentException("Parameter labelName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getLabelHistory(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, labelName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getLabelHistoryAsync(String resourceGroupName, String containerAppName, + String labelName) { + return getLabelHistoryWithResponseAsync(resourceGroupName, containerAppName, labelName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLabelHistoryWithResponse(String resourceGroupName, String containerAppName, + String labelName, Context context) { + return getLabelHistoryWithResponseAsync(resourceGroupName, containerAppName, labelName, context).block(); + } + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelHistoryInner getLabelHistory(String resourceGroupName, String containerAppName, String labelName) { + return getLabelHistoryWithResponse(resourceGroupName, containerAppName, labelName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Label History collection ARM resource along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLabelHistoryNextSinglePageAsync(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.listLabelHistoryNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Label History collection ARM resource along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLabelHistoryNextSinglePageAsync(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.listLabelHistoryNext(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/ContainerAppsLabelHistoriesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsLabelHistoriesImpl.java new file mode 100644 index 0000000000000..4eec31e20d9bf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsLabelHistoriesImpl.java @@ -0,0 +1,71 @@ +// Copyright (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.ContainerAppsLabelHistoriesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsLabelHistories; +import com.azure.resourcemanager.appcontainers.models.LabelHistory; + +public final class ContainerAppsLabelHistoriesImpl implements ContainerAppsLabelHistories { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsLabelHistoriesImpl.class); + + private final ContainerAppsLabelHistoriesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsLabelHistoriesImpl(ContainerAppsLabelHistoriesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listLabelHistory(String resourceGroupName, String containerAppName) { + PagedIterable inner + = this.serviceClient().listLabelHistory(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LabelHistoryImpl(inner1, this.manager())); + } + + public PagedIterable listLabelHistory(String resourceGroupName, String containerAppName, + String filter, Context context) { + PagedIterable inner + = this.serviceClient().listLabelHistory(resourceGroupName, containerAppName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LabelHistoryImpl(inner1, this.manager())); + } + + public Response getLabelHistoryWithResponse(String resourceGroupName, String containerAppName, + String labelName, Context context) { + Response inner + = this.serviceClient().getLabelHistoryWithResponse(resourceGroupName, containerAppName, labelName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LabelHistoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LabelHistory getLabelHistory(String resourceGroupName, String containerAppName, String labelName) { + LabelHistoryInner inner = this.serviceClient().getLabelHistory(resourceGroupName, containerAppName, labelName); + if (inner != null) { + return new LabelHistoryImpl(inner, this.manager()); + } else { + return null; + } + } + + private ContainerAppsLabelHistoriesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java index 011522485f377..98cd2c462bb1e 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 @@ -107,21 +107,20 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String resourceGroupName; - private String connectedEnvironmentName; + private String environmentName; private String componentName; - public DaprComponentImpl withExistingConnectedEnvironment(String resourceGroupName, - String connectedEnvironmentName) { + public DaprComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { this.resourceGroupName = resourceGroupName; - this.connectedEnvironmentName = connectedEnvironmentName; + this.environmentName = environmentName; return this; } public DaprComponent create() { this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + .getDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) .getValue(); return this; @@ -129,9 +128,8 @@ public DaprComponent create() { public DaprComponent create(Context context) { this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), - context) + .getDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, this.innerModel(), context) .getValue(); return this; } @@ -148,8 +146,8 @@ public DaprComponentImpl update() { public DaprComponent apply() { this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + .getDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) .getValue(); return this; @@ -157,9 +155,8 @@ public DaprComponent apply() { public DaprComponent apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), - context) + .getDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, this.innerModel(), context) .getValue(); return this; } @@ -169,35 +166,33 @@ public DaprComponent apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); } public DaprComponent refresh() { this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsDaprComponents() - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + .getDaprComponents() + .getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE) .getValue(); return this; } public DaprComponent refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsDaprComponents() - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context) + .getDaprComponents() + .getWithResponse(resourceGroupName, environmentName, componentName, context) .getValue(); return this; } public Response listSecretsWithResponse(Context context) { - return serviceManager.connectedEnvironmentsDaprComponents() - .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + return serviceManager.daprComponents() + .listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); } public DaprSecretsCollection listSecrets() { - return serviceManager.connectedEnvironmentsDaprComponents() - .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); + return serviceManager.daprComponents().listSecrets(resourceGroupName, environmentName, componentName); } public DaprComponentImpl withComponentType(String componentType) { 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 e08035e86f854..41a15f688c2a8 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 @@ -61,30 +61,6 @@ 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); @@ -116,6 +92,82 @@ public DaprSecretsCollection listSecrets(String resourceGroupName, String enviro } } + public DaprComponent getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, componentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + this.deleteWithResponse(resourceGroupName, environmentName, componentName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.deleteWithResponse(resourceGroupName, environmentName, componentName, context); + } + private DaprComponentsClient serviceClient() { return this.innerClient; } @@ -123,4 +175,8 @@ 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/HttpRouteConfigImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigImpl.java new file mode 100644 index 0000000000000..223c66ee38d3d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigImpl.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfig; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigProperties; + +public final class HttpRouteConfigImpl implements HttpRouteConfig, HttpRouteConfig.Definition, HttpRouteConfig.Update { + private HttpRouteConfigInner 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 HttpRouteConfigProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public HttpRouteConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String httpRouteName; + + public HttpRouteConfigImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public HttpRouteConfig create() { + this.innerObject = serviceManager.serviceClient() + .getHttpRouteConfigs() + .createOrUpdateWithResponse(resourceGroupName, environmentName, httpRouteName, this.innerModel(), + Context.NONE) + .getValue(); + return this; + } + + public HttpRouteConfig create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getHttpRouteConfigs() + .createOrUpdateWithResponse(resourceGroupName, environmentName, httpRouteName, this.innerModel(), context) + .getValue(); + return this; + } + + HttpRouteConfigImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new HttpRouteConfigInner(); + this.serviceManager = serviceManager; + this.httpRouteName = name; + } + + public HttpRouteConfigImpl update() { + return this; + } + + public HttpRouteConfig apply() { + this.innerObject = serviceManager.serviceClient() + .getHttpRouteConfigs() + .updateWithResponse(resourceGroupName, environmentName, httpRouteName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HttpRouteConfig apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getHttpRouteConfigs() + .updateWithResponse(resourceGroupName, environmentName, httpRouteName, this.innerModel(), context) + .getValue(); + return this; + } + + HttpRouteConfigImpl(HttpRouteConfigInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.httpRouteName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "httpRouteConfigs"); + } + + public HttpRouteConfig refresh() { + this.innerObject = serviceManager.serviceClient() + .getHttpRouteConfigs() + .getWithResponse(resourceGroupName, environmentName, httpRouteName, Context.NONE) + .getValue(); + return this; + } + + public HttpRouteConfig refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getHttpRouteConfigs() + .getWithResponse(resourceGroupName, environmentName, httpRouteName, context) + .getValue(); + return this; + } + + public HttpRouteConfigImpl withProperties(HttpRouteConfigProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigsClientImpl.java new file mode 100644 index 0000000000000..6ed3cbc6fda75 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigsClientImpl.java @@ -0,0 +1,909 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.HttpRouteConfigsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigCollection; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in HttpRouteConfigsClient. + */ +public final class HttpRouteConfigsClientImpl implements HttpRouteConfigsClient { + /** + * The proxy service used to perform REST calls. + */ + private final HttpRouteConfigsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of HttpRouteConfigsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + HttpRouteConfigsClientImpl(ContainerAppsApiClientImpl client) { + this.service + = RestProxy.create(HttpRouteConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientHttpRouteConfigs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface HttpRouteConfigsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("httpRouteName") String httpRouteName, + @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}/httpRouteConfigs/{httpRouteName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("httpRouteName") String httpRouteName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HttpRouteConfigInner httpRouteConfigEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("httpRouteName") String httpRouteName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HttpRouteConfigInner httpRouteConfigEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}") + @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("httpRouteName") String httpRouteName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs") + @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 Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String httpRouteName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName 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, httpRouteName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String httpRouteName, 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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName 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, httpRouteName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, + String httpRouteName) { + return getWithResponseAsync(resourceGroupName, environmentName, httpRouteName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, httpRouteName, context).block(); + } + + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HttpRouteConfigInner get(String resourceGroupName, String environmentName, String httpRouteName) { + return getWithResponse(resourceGroupName, environmentName, httpRouteName, Context.NONE).getValue(); + } + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Http Route config to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName is required and cannot be null.")); + } + if (httpRouteConfigEnvelope != null) { + httpRouteConfigEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, httpRouteName, this.client.getApiVersion(), httpRouteConfigEnvelope, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Http Route config to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope, 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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName is required and cannot be null.")); + } + if (httpRouteConfigEnvelope != null) { + httpRouteConfigEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, httpRouteName, this.client.getApiVersion(), httpRouteConfigEnvelope, accept, context); + } + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return advanced Ingress routing for path/header based routing for a Container App Environment on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String httpRouteName) { + final HttpRouteConfigInner httpRouteConfigEnvelope = null; + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, httpRouteName, + httpRouteConfigEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Http Route config to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, httpRouteName, + httpRouteConfigEnvelope, context).block(); + } + + /** + * Create or Update a Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return advanced Ingress routing for path/header based routing for a Container App Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HttpRouteConfigInner createOrUpdate(String resourceGroupName, String environmentName, String httpRouteName) { + final HttpRouteConfigInner httpRouteConfigEnvelope = null; + return createOrUpdateWithResponse(resourceGroupName, environmentName, httpRouteName, httpRouteConfigEnvelope, + Context.NONE).getValue(); + } + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String environmentName, String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName is required and cannot be null.")); + } + if (httpRouteConfigEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter httpRouteConfigEnvelope is required and cannot be null.")); + } else { + httpRouteConfigEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, httpRouteName, this.client.getApiVersion(), httpRouteConfigEnvelope, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String environmentName, String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope, 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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName is required and cannot be null.")); + } + if (httpRouteConfigEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter httpRouteConfigEnvelope is required and cannot be null.")); + } else { + httpRouteConfigEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, httpRouteName, this.client.getApiVersion(), httpRouteConfigEnvelope, accept, context); + } + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String environmentName, + String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope) { + return updateWithResponseAsync(resourceGroupName, environmentName, httpRouteName, httpRouteConfigEnvelope) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, HttpRouteConfigInner httpRouteConfigEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, environmentName, httpRouteName, httpRouteConfigEnvelope, + context).block(); + } + + /** + * Update tags of a manged http route object + * + * Patches an http route config resource. 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 httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config 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 advanced Ingress routing for path/header based routing for a Container App Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HttpRouteConfigInner update(String resourceGroupName, String environmentName, String httpRouteName, + HttpRouteConfigInner httpRouteConfigEnvelope) { + return updateWithResponse(resourceGroupName, environmentName, httpRouteName, httpRouteConfigEnvelope, + Context.NONE).getValue(); + } + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String httpRouteName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName 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, httpRouteName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String httpRouteName, 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 (httpRouteName == null) { + return Mono.error(new IllegalArgumentException("Parameter httpRouteName 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, httpRouteName, this.client.getApiVersion(), accept, context); + } + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String httpRouteName) { + return deleteWithResponseAsync(resourceGroupName, environmentName, httpRouteName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String environmentName, String httpRouteName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, httpRouteName, context).block(); + } + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String httpRouteName) { + deleteWithResponse(resourceGroupName, environmentName, httpRouteName, Context.NONE); + } + + /** + * Get the Managed Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes 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 Http Routes in a given managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Advanced Ingress Routing Config resources along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ingress Routing Config resources along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigsImpl.java new file mode 100644 index 0000000000000..09535c8f3e860 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/HttpRouteConfigsImpl.java @@ -0,0 +1,158 @@ +// Copyright (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.HttpRouteConfigsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfig; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigs; + +public final class HttpRouteConfigsImpl implements HttpRouteConfigs { + private static final ClientLogger LOGGER = new ClientLogger(HttpRouteConfigsImpl.class); + + private final HttpRouteConfigsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public HttpRouteConfigsImpl(HttpRouteConfigsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String environmentName, + String httpRouteName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, httpRouteName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new HttpRouteConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HttpRouteConfig get(String resourceGroupName, String environmentName, String httpRouteName) { + HttpRouteConfigInner inner = this.serviceClient().get(resourceGroupName, environmentName, httpRouteName); + if (inner != null) { + return new HttpRouteConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String environmentName, String httpRouteName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, httpRouteName, context); + } + + public void delete(String resourceGroupName, String environmentName, String httpRouteName) { + this.serviceClient().delete(resourceGroupName, environmentName, httpRouteName); + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HttpRouteConfigImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HttpRouteConfigImpl(inner1, this.manager())); + } + + public HttpRouteConfig getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String httpRouteName = ResourceManagerUtils.getValueFromIdByName(id, "httpRouteConfigs"); + if (httpRouteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'httpRouteConfigs'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, httpRouteName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String httpRouteName = ResourceManagerUtils.getValueFromIdByName(id, "httpRouteConfigs"); + if (httpRouteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'httpRouteConfigs'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, httpRouteName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String httpRouteName = ResourceManagerUtils.getValueFromIdByName(id, "httpRouteConfigs"); + if (httpRouteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'httpRouteConfigs'.", id))); + } + this.deleteWithResponse(resourceGroupName, environmentName, httpRouteName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String httpRouteName = ResourceManagerUtils.getValueFromIdByName(id, "httpRouteConfigs"); + if (httpRouteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'httpRouteConfigs'.", id))); + } + return this.deleteWithResponse(resourceGroupName, environmentName, httpRouteName, context); + } + + private HttpRouteConfigsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public HttpRouteConfigImpl define(String name) { + return new HttpRouteConfigImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LabelHistoryImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LabelHistoryImpl.java new file mode 100644 index 0000000000000..b17182fe4646d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LabelHistoryImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner; +import com.azure.resourcemanager.appcontainers.models.LabelHistory; +import com.azure.resourcemanager.appcontainers.models.LabelHistoryProperties; + +public final class LabelHistoryImpl implements LabelHistory { + private LabelHistoryInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + LabelHistoryImpl(LabelHistoryInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public LabelHistoryProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public LabelHistoryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationResourceImpl.java new file mode 100644 index 0000000000000..2170e748d139f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationResourceImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.MaintenanceConfigurationResourceInner; +import com.azure.resourcemanager.appcontainers.models.MaintenanceConfigurationResource; +import com.azure.resourcemanager.appcontainers.models.ScheduledEntry; +import java.util.Collections; +import java.util.List; + +public final class MaintenanceConfigurationResourceImpl implements MaintenanceConfigurationResource, + MaintenanceConfigurationResource.Definition, MaintenanceConfigurationResource.Update { + private MaintenanceConfigurationResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List scheduledEntries() { + List inner = this.innerModel().scheduledEntries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MaintenanceConfigurationResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String configName; + + public MaintenanceConfigurationResourceImpl withExistingManagedEnvironment(String resourceGroupName, + String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public MaintenanceConfigurationResource create() { + this.innerObject = serviceManager.serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, environmentName, configName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfigurationResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, environmentName, configName, this.innerModel(), context) + .getValue(); + return this; + } + + MaintenanceConfigurationResourceImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new MaintenanceConfigurationResourceInner(); + this.serviceManager = serviceManager; + this.configName = name; + } + + public MaintenanceConfigurationResourceImpl update() { + return this; + } + + public MaintenanceConfigurationResource apply() { + this.innerObject = serviceManager.serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, environmentName, configName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfigurationResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, environmentName, configName, this.innerModel(), context) + .getValue(); + return this; + } + + MaintenanceConfigurationResourceImpl(MaintenanceConfigurationResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironment"); + this.configName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "maintenanceConfigurations"); + } + + public MaintenanceConfigurationResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getMaintenanceConfigurations() + .getWithResponse(resourceGroupName, environmentName, configName, Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfigurationResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMaintenanceConfigurations() + .getWithResponse(resourceGroupName, environmentName, configName, context) + .getValue(); + return this; + } + + public MaintenanceConfigurationResourceImpl withScheduledEntries(List scheduledEntries) { + this.innerModel().withScheduledEntries(scheduledEntries); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationsClientImpl.java new file mode 100644 index 0000000000000..d610b6904f281 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationsClientImpl.java @@ -0,0 +1,746 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.MaintenanceConfigurationResourceInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.MaintenanceConfigurationCollection; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. + */ +public final class MaintenanceConfigurationsClientImpl implements MaintenanceConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MaintenanceConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of MaintenanceConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenanceConfigurationsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(MaintenanceConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientMaintenanceConfigurations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface MaintenanceConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/maintenanceConfigurations") + @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" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("configName") String configName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}") + @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("configName") String configName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("configName") String configName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified 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())); + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified 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)); + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified 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)); + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified 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)); + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified 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)); + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified 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)); + } + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String environmentName, String configName, + MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + if (maintenanceConfigurationEnvelope == null) { + return Mono.error(new IllegalArgumentException( + "Parameter maintenanceConfigurationEnvelope is required and cannot be null.")); + } else { + maintenanceConfigurationEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, configName, this.client.getApiVersion(), + maintenanceConfigurationEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String environmentName, String configName, + MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope, 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 (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + if (maintenanceConfigurationEnvelope == null) { + return Mono.error(new IllegalArgumentException( + "Parameter maintenanceConfigurationEnvelope is required and cannot be null.")); + } else { + maintenanceConfigurationEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, configName, this.client.getApiVersion(), maintenanceConfigurationEnvelope, accept, + context); + } + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String environmentName, String configName, + MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, configName, + maintenanceConfigurationEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String environmentName, String configName, + MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, configName, + maintenanceConfigurationEnvelope, context).block(); + } + + /** + * Create or update the maintenance configuration for Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for ManagedEnvironment . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Maintenance Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationResourceInner createOrUpdate(String resourceGroupName, String environmentName, + String configName, MaintenanceConfigurationResourceInner maintenanceConfigurationEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, environmentName, configName, + maintenanceConfigurationEnvelope, Context.NONE).getValue(); + } + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 configName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName 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, configName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 configName, 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 (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName 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, configName, this.client.getApiVersion(), accept, context); + } + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 configName) { + return deleteWithResponseAsync(resourceGroupName, environmentName, configName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 configName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, configName, context).block(); + } + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 configName) { + deleteWithResponse(resourceGroupName, environmentName, configName, Context.NONE); + } + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String configName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName 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, configName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String configName, 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 (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName 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, configName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, + String configName) { + return getWithResponseAsync(resourceGroupName, environmentName, configName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String environmentName, String configName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, configName, context).block(); + } + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationResourceInner get(String resourceGroupName, String environmentName, + String configName) { + return getWithResponse(resourceGroupName, environmentName, configName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of list maintenance configuration resources along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of list maintenance configuration resources along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationsImpl.java new file mode 100644 index 0000000000000..df426676108c7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/MaintenanceConfigurationsImpl.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.MaintenanceConfigurationResourceInner; +import com.azure.resourcemanager.appcontainers.models.MaintenanceConfigurationResource; +import com.azure.resourcemanager.appcontainers.models.MaintenanceConfigurations; + +public final class MaintenanceConfigurationsImpl implements MaintenanceConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceConfigurationsImpl.class); + + private final MaintenanceConfigurationsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public MaintenanceConfigurationsImpl(MaintenanceConfigurationsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new MaintenanceConfigurationResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new MaintenanceConfigurationResourceImpl(inner1, this.manager())); + } + + public Response deleteWithResponse(String resourceGroupName, String environmentName, String configName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, configName, context); + } + + public void delete(String resourceGroupName, String environmentName, String configName) { + this.serviceClient().delete(resourceGroupName, environmentName, configName); + } + + public Response getWithResponse(String resourceGroupName, String environmentName, + String configName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, configName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceConfigurationResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MaintenanceConfigurationResource get(String resourceGroupName, String environmentName, String configName) { + MaintenanceConfigurationResourceInner inner + = this.serviceClient().get(resourceGroupName, environmentName, configName); + if (inner != null) { + return new MaintenanceConfigurationResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public MaintenanceConfigurationResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironment"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironment'.", id))); + } + String configName = ResourceManagerUtils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, configName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironment"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironment'.", id))); + } + String configName = ResourceManagerUtils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, configName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironment"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironment'.", id))); + } + String configName = ResourceManagerUtils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + this.deleteWithResponse(resourceGroupName, environmentName, configName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironment"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironment'.", id))); + } + String configName = ResourceManagerUtils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + return this.deleteWithResponse(resourceGroupName, environmentName, configName, context); + } + + private MaintenanceConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public MaintenanceConfigurationResourceImpl define(String name) { + return new MaintenanceConfigurationResourceImpl(name, this.manager()); + } +} 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 ac1df30cdd614..4a63d86bedcd7 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 @@ -118,6 +118,15 @@ public Boolean zoneRedundant() { return this.innerModel().zoneRedundant(); } + public List availabilityZones() { + List inner = this.innerModel().availabilityZones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public CustomDomainConfiguration customDomainConfiguration() { return this.innerModel().customDomainConfiguration(); } @@ -332,6 +341,11 @@ public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { return this; } + public ManagedEnvironmentImpl withAvailabilityZones(List availabilityZones) { + this.innerModel().withAvailabilityZones(availabilityZones); + return this; + } + public ManagedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java index 93deebbb0d1b9..d5f2d649bf168 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java @@ -12,6 +12,8 @@ import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; import com.azure.resourcemanager.appcontainers.models.Template; import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; public final class RevisionImpl implements Revision { private RevisionInner innerObject; @@ -68,6 +70,15 @@ public Integer trafficWeight() { return this.innerModel().trafficWeight(); } + public List labels() { + List inner = this.innerModel().labels(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String provisioningError() { return this.innerModel().provisioningError(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java index a37b9bcc471e1..137b90aba0d3e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityAutoGenerated; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; @@ -52,6 +54,10 @@ public Map tags() { } } + public ManagedServiceIdentityAutoGenerated identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -105,6 +111,15 @@ public SessionPoolProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public List managedIdentitySettings() { + List inner = this.innerModel().managedIdentitySettings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -214,6 +229,16 @@ public SessionPoolImpl withTags(Map tags) { return this; } + public SessionPoolImpl withIdentity(ManagedServiceIdentityAutoGenerated identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateSessionPoolEnvelope.withIdentity(identity); + return this; + } + } + public SessionPoolImpl withEnvironmentId(String environmentId) { this.innerModel().withEnvironmentId(environmentId); return this; @@ -279,6 +304,11 @@ public SessionPoolImpl withSessionNetworkConfiguration(SessionNetworkConfigurati } } + public SessionPoolImpl withManagedIdentitySettings(List managedIdentitySettings) { + this.innerModel().withManagedIdentitySettings(managedIdentitySettings); + 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/models/ActiveRevisionsMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java index f0ca43bde5e23..fe411feabdc91 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 @@ -9,9 +9,10 @@ /** * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one revision - * can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the - * default.</item></list>. + * <list><item>Single: Only one revision can be active at a time. Traffic weights cannot be used. This is + * the default.</item><item>Multiple: Multiple revisions can be active, including optional traffic weights + * and labels.</item><item>Labels: Only revisions with labels are active. Traffic weights can be applied to + * labels.</item></list>. */ public final class ActiveRevisionsMode extends ExpandableStringEnum { /** @@ -24,6 +25,11 @@ public final class ActiveRevisionsMode extends ExpandableStringEnum { */ public static final BindingType SNI_ENABLED = fromString("SniEnabled"); + /** + * Static value Auto for BindingType. + */ + public static final BindingType AUTO = fromString("Auto"); + /** * Creates a new instance of BindingType value. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java index 9f0c27bd913c4..a38e7cda9f10e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.appcontainers.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -18,10 +17,26 @@ @Fluent public final class BlobStorageTokenStore implements JsonSerializable { /* - * The name of the app secrets containing the SAS URL of the blob storage containing the tokens. + * The name of the app secrets containing the SAS URL of the blob storage containing the tokens. Should not be used + * along with blobContainerUri. */ private String sasUrlSettingName; + /* + * The URI of the blob storage containing the tokens. Should not be used along with sasUrlSettingName. + */ + private String blobContainerUri; + + /* + * The Client ID of a User-Assigned Managed Identity. Should not be used along with managedIdentityResourceId. + */ + private String clientId; + + /* + * The Resource ID of a User-Assigned Managed Identity. Should not be used along with clientId. + */ + private String managedIdentityResourceId; + /** * Creates an instance of BlobStorageTokenStore class. */ @@ -30,7 +45,7 @@ public BlobStorageTokenStore() { /** * Get the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage - * containing the tokens. + * containing the tokens. Should not be used along with blobContainerUri. * * @return the sasUrlSettingName value. */ @@ -40,7 +55,7 @@ public String sasUrlSettingName() { /** * Set the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage - * containing the tokens. + * containing the tokens. Should not be used along with blobContainerUri. * * @param sasUrlSettingName the sasUrlSettingName value to set. * @return the BlobStorageTokenStore object itself. @@ -50,21 +65,80 @@ public BlobStorageTokenStore withSasUrlSettingName(String sasUrlSettingName) { return this; } + /** + * Get the blobContainerUri property: The URI of the blob storage containing the tokens. Should not be used along + * with sasUrlSettingName. + * + * @return the blobContainerUri value. + */ + public String blobContainerUri() { + return this.blobContainerUri; + } + + /** + * Set the blobContainerUri property: The URI of the blob storage containing the tokens. Should not be used along + * with sasUrlSettingName. + * + * @param blobContainerUri the blobContainerUri value to set. + * @return the BlobStorageTokenStore object itself. + */ + public BlobStorageTokenStore withBlobContainerUri(String blobContainerUri) { + this.blobContainerUri = blobContainerUri; + return this; + } + + /** + * Get the clientId property: The Client ID of a User-Assigned Managed Identity. Should not be used along with + * managedIdentityResourceId. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of a User-Assigned Managed Identity. Should not be used along with + * managedIdentityResourceId. + * + * @param clientId the clientId value to set. + * @return the BlobStorageTokenStore object itself. + */ + public BlobStorageTokenStore withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the managedIdentityResourceId property: The Resource ID of a User-Assigned Managed Identity. Should not be + * used along with clientId. + * + * @return the managedIdentityResourceId value. + */ + public String managedIdentityResourceId() { + return this.managedIdentityResourceId; + } + + /** + * Set the managedIdentityResourceId property: The Resource ID of a User-Assigned Managed Identity. Should not be + * used along with clientId. + * + * @param managedIdentityResourceId the managedIdentityResourceId value to set. + * @return the BlobStorageTokenStore object itself. + */ + public BlobStorageTokenStore withManagedIdentityResourceId(String managedIdentityResourceId) { + this.managedIdentityResourceId = managedIdentityResourceId; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (sasUrlSettingName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sasUrlSettingName in model BlobStorageTokenStore")); - } } - private static final ClientLogger LOGGER = new ClientLogger(BlobStorageTokenStore.class); - /** * {@inheritDoc} */ @@ -72,6 +146,9 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("sasUrlSettingName", this.sasUrlSettingName); + jsonWriter.writeStringField("blobContainerUri", this.blobContainerUri); + jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("managedIdentityResourceId", this.managedIdentityResourceId); return jsonWriter.writeEndObject(); } @@ -81,7 +158,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BlobStorageTokenStore if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the BlobStorageTokenStore. */ public static BlobStorageTokenStore fromJson(JsonReader jsonReader) throws IOException { @@ -93,6 +169,12 @@ public static BlobStorageTokenStore fromJson(JsonReader jsonReader) throws IOExc if ("sasUrlSettingName".equals(fieldName)) { deserializedBlobStorageTokenStore.sasUrlSettingName = reader.getString(); + } else if ("blobContainerUri".equals(fieldName)) { + deserializedBlobStorageTokenStore.blobContainerUri = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedBlobStorageTokenStore.clientId = reader.getString(); + } else if ("managedIdentityResourceId".equals(fieldName)) { + deserializedBlobStorageTokenStore.managedIdentityResourceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java index 41c1f8b603925..56130cc943826 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java @@ -24,6 +24,11 @@ public final class CertificateProperties implements JsonSerializable { /* * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * Multiple: multiple revisions can be active.Single: Only one revision can be active at a - * time. Revision weights can not be used in this mode. If no value if provided, this is the default. + * Single: Only one revision can be active at a time. Traffic weights cannot be used. This is the + * default.Multiple: Multiple revisions can be active, including optional traffic weights and + * labels.Labels: Only revisions with labels are active. Traffic weights can be applied to + * labels. */ private ActiveRevisionsMode activeRevisionsMode; + /* + * Required in labels revisions mode. Label to apply to newly created revision. + */ + private String targetLabel; + /* * Ingress configurations. */ @@ -54,6 +61,12 @@ public final class Configuration implements JsonSerializable { */ private Integer maxInactiveRevisions; + /* + * Optional. The percent of the total number of replicas that must be brought up before revision transition occurs. + * Defaults to 100 when none is given. Value must be greater than 0 and less than or equal to 100. + */ + private Integer revisionTransitionThreshold; + /* * Container App to be a dev Container App Service */ @@ -94,9 +107,10 @@ public Configuration withSecrets(List secrets) { /** * Get the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the * Container app: - * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one - * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is - * the default.</item></list>. + * <list><item>Single: Only one revision can be active at a time. Traffic weights cannot be used. This + * is the default.</item><item>Multiple: Multiple revisions can be active, including optional traffic + * weights and labels.</item><item>Labels: Only revisions with labels are active. Traffic weights can be + * applied to labels.</item></list>. * * @return the activeRevisionsMode value. */ @@ -107,9 +121,10 @@ public ActiveRevisionsMode activeRevisionsMode() { /** * Set the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the * Container app: - * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one - * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is - * the default.</item></list>. + * <list><item>Single: Only one revision can be active at a time. Traffic weights cannot be used. This + * is the default.</item><item>Multiple: Multiple revisions can be active, including optional traffic + * weights and labels.</item><item>Labels: Only revisions with labels are active. Traffic weights can be + * applied to labels.</item></list>. * * @param activeRevisionsMode the activeRevisionsMode value to set. * @return the Configuration object itself. @@ -119,6 +134,26 @@ public Configuration withActiveRevisionsMode(ActiveRevisionsMode activeRevisions return this; } + /** + * Get the targetLabel property: Required in labels revisions mode. Label to apply to newly created revision. + * + * @return the targetLabel value. + */ + public String targetLabel() { + return this.targetLabel; + } + + /** + * Set the targetLabel property: Required in labels revisions mode. Label to apply to newly created revision. + * + * @param targetLabel the targetLabel value to set. + * @return the Configuration object itself. + */ + public Configuration withTargetLabel(String targetLabel) { + this.targetLabel = targetLabel; + return this; + } + /** * Get the ingress property: Ingress configurations. * @@ -221,6 +256,30 @@ public Configuration withMaxInactiveRevisions(Integer maxInactiveRevisions) { return this; } + /** + * Get the revisionTransitionThreshold property: Optional. The percent of the total number of replicas that must be + * brought up before revision transition occurs. Defaults to 100 when none is given. Value must be greater than 0 + * and less than or equal to 100. + * + * @return the revisionTransitionThreshold value. + */ + public Integer revisionTransitionThreshold() { + return this.revisionTransitionThreshold; + } + + /** + * Set the revisionTransitionThreshold property: Optional. The percent of the total number of replicas that must be + * brought up before revision transition occurs. Defaults to 100 when none is given. Value must be greater than 0 + * and less than or equal to 100. + * + * @param revisionTransitionThreshold the revisionTransitionThreshold value to set. + * @return the Configuration object itself. + */ + public Configuration withRevisionTransitionThreshold(Integer revisionTransitionThreshold) { + this.revisionTransitionThreshold = revisionTransitionThreshold; + return this; + } + /** * Get the service property: Container App to be a dev Container App Service. * @@ -301,11 +360,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("activeRevisionsMode", this.activeRevisionsMode == null ? null : this.activeRevisionsMode.toString()); + jsonWriter.writeStringField("targetLabel", this.targetLabel); jsonWriter.writeJsonField("ingress", this.ingress); jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("dapr", this.dapr); jsonWriter.writeJsonField("runtime", this.runtime); jsonWriter.writeNumberField("maxInactiveRevisions", this.maxInactiveRevisions); + jsonWriter.writeNumberField("revisionTransitionThreshold", this.revisionTransitionThreshold); jsonWriter.writeJsonField("service", this.service); jsonWriter.writeArrayField("identitySettings", this.identitySettings, (writer, element) -> writer.writeJson(element)); @@ -332,6 +393,8 @@ public static Configuration fromJson(JsonReader jsonReader) throws IOException { deserializedConfiguration.secrets = secrets; } else if ("activeRevisionsMode".equals(fieldName)) { deserializedConfiguration.activeRevisionsMode = ActiveRevisionsMode.fromString(reader.getString()); + } else if ("targetLabel".equals(fieldName)) { + deserializedConfiguration.targetLabel = reader.getString(); } else if ("ingress".equals(fieldName)) { deserializedConfiguration.ingress = Ingress.fromJson(reader); } else if ("registries".equals(fieldName)) { @@ -344,6 +407,8 @@ public static Configuration fromJson(JsonReader jsonReader) throws IOException { deserializedConfiguration.runtime = Runtime.fromJson(reader); } else if ("maxInactiveRevisions".equals(fieldName)) { deserializedConfiguration.maxInactiveRevisions = reader.getNullable(JsonReader::getInt); + } else if ("revisionTransitionThreshold".equals(fieldName)) { + deserializedConfiguration.revisionTransitionThreshold = reader.getNullable(JsonReader::getInt); } else if ("service".equals(fieldName)) { deserializedConfiguration.service = Service.fromJson(reader); } else if ("identitySettings".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponent.java new file mode 100644 index 0000000000000..569065ad70343 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponent.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner; + +/** + * An immutable client-side representation of ConnectedEnvironmentDaprComponent. + */ +public interface ConnectedEnvironmentDaprComponent { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Dapr component properties. + * + * @return the properties value. + */ + ConnectedEnvironmentDaprComponentProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner + * object. + * + * @return the inner object. + */ + ConnectedEnvironmentDaprComponentInner innerModel(); + + /** + * The entirety of the ConnectedEnvironmentDaprComponent definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ConnectedEnvironmentDaprComponent definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ConnectedEnvironmentDaprComponent definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ConnectedEnvironmentDaprComponent definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, connectedEnvironmentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @return the next definition stage. + */ + WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); + } + + /** + * The stage of the ConnectedEnvironmentDaprComponent definition which contains all the minimum required + * properties for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ConnectedEnvironmentDaprComponent create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ConnectedEnvironmentDaprComponent create(Context context); + } + + /** + * The stage of the ConnectedEnvironmentDaprComponent definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Dapr component properties. + * + * @param properties Dapr component properties. + * @return the next definition stage. + */ + WithCreate withProperties(ConnectedEnvironmentDaprComponentProperties properties); + } + } + + /** + * Begins update for the ConnectedEnvironmentDaprComponent resource. + * + * @return the stage of resource update. + */ + ConnectedEnvironmentDaprComponent.Update update(); + + /** + * The template for ConnectedEnvironmentDaprComponent update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ConnectedEnvironmentDaprComponent apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ConnectedEnvironmentDaprComponent apply(Context context); + } + + /** + * The ConnectedEnvironmentDaprComponent update stages. + */ + interface UpdateStages { + /** + * The stage of the ConnectedEnvironmentDaprComponent update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Dapr component properties. + * + * @param properties Dapr component properties. + * @return the next definition stage. + */ + Update withProperties(ConnectedEnvironmentDaprComponentProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ConnectedEnvironmentDaprComponent refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ConnectedEnvironmentDaprComponent refresh(Context context); + + /** + * List secrets for a dapr component. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. + */ + Response listSecretsWithResponse(Context context); + + /** + * List secrets for a dapr component. + * + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action. + */ + DaprSecretsCollection listSecrets(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentProperties.java new file mode 100644 index 0000000000000..0cf1c8845f1d5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentProperties.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentProperties; +import java.io.IOException; +import java.util.List; + +/** + * Dapr component properties. + */ +@Fluent +public final class ConnectedEnvironmentDaprComponentProperties extends DaprComponentProperties { + /* + * Provisioning state of the Connected Environment Dapr Component. + */ + private ConnectedEnvironmentDaprComponentProvisioningState provisioningState; + + /* + * Any errors that occurred during deployment or deployment validation + */ + private String deploymentErrors; + + /** + * Creates an instance of ConnectedEnvironmentDaprComponentProperties class. + */ + public ConnectedEnvironmentDaprComponentProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the Connected Environment Dapr Component. + * + * @return the provisioningState value. + */ + public ConnectedEnvironmentDaprComponentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. + * + * @return the deploymentErrors value. + */ + public String deploymentErrors() { + return this.deploymentErrors; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withComponentType(String componentType) { + super.withComponentType(componentType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withVersion(String version) { + super.withVersion(version); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withIgnoreErrors(Boolean ignoreErrors) { + super.withIgnoreErrors(ignoreErrors); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withInitTimeout(String initTimeout) { + super.withInitTimeout(initTimeout); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withSecrets(List secrets) { + super.withSecrets(secrets); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withSecretStoreComponent(String secretStoreComponent) { + super.withSecretStoreComponent(secretStoreComponent); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withMetadata(List metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties withScopes(List scopes) { + super.withScopes(scopes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedEnvironmentDaprComponentProperties + withServiceComponentBind(List serviceComponentBind) { + super.withServiceComponentBind(serviceComponentBind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (secrets() != null) { + secrets().forEach(e -> e.validate()); + } + if (metadata() != null) { + metadata().forEach(e -> e.validate()); + } + if (serviceComponentBind() != null) { + serviceComponentBind().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("componentType", componentType()); + jsonWriter.writeStringField("version", version()); + jsonWriter.writeBooleanField("ignoreErrors", ignoreErrors()); + jsonWriter.writeStringField("initTimeout", initTimeout()); + jsonWriter.writeArrayField("secrets", secrets(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("secretStoreComponent", secretStoreComponent()); + jsonWriter.writeArrayField("metadata", metadata(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("scopes", scopes(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("serviceComponentBind", serviceComponentBind(), + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedEnvironmentDaprComponentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedEnvironmentDaprComponentProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConnectedEnvironmentDaprComponentProperties. + */ + public static ConnectedEnvironmentDaprComponentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedEnvironmentDaprComponentProperties deserializedConnectedEnvironmentDaprComponentProperties + = new ConnectedEnvironmentDaprComponentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("componentType".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties.withComponentType(reader.getString()); + } else if ("version".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties.withVersion(reader.getString()); + } else if ("ignoreErrors".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties + .withIgnoreErrors(reader.getNullable(JsonReader::getBoolean)); + } else if ("initTimeout".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties.withInitTimeout(reader.getString()); + } else if ("secrets".equals(fieldName)) { + List secrets = reader.readArray(reader1 -> Secret.fromJson(reader1)); + deserializedConnectedEnvironmentDaprComponentProperties.withSecrets(secrets); + } else if ("secretStoreComponent".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties + .withSecretStoreComponent(reader.getString()); + } else if ("metadata".equals(fieldName)) { + List metadata = reader.readArray(reader1 -> DaprMetadata.fromJson(reader1)); + deserializedConnectedEnvironmentDaprComponentProperties.withMetadata(metadata); + } else if ("scopes".equals(fieldName)) { + List scopes = reader.readArray(reader1 -> reader1.getString()); + deserializedConnectedEnvironmentDaprComponentProperties.withScopes(scopes); + } else if ("serviceComponentBind".equals(fieldName)) { + List serviceComponentBind + = reader.readArray(reader1 -> DaprComponentServiceBinding.fromJson(reader1)); + deserializedConnectedEnvironmentDaprComponentProperties + .withServiceComponentBind(serviceComponentBind); + } else if ("provisioningState".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties.provisioningState + = ConnectedEnvironmentDaprComponentProvisioningState.fromString(reader.getString()); + } else if ("deploymentErrors".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentProperties.deploymentErrors = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedEnvironmentDaprComponentProperties; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentProvisioningState.java new file mode 100644 index 0000000000000..870f431989965 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning state of the Connected Environment Dapr Component. + */ +public final class ConnectedEnvironmentDaprComponentProvisioningState + extends ExpandableStringEnum { + /** + * Static value Succeeded for ConnectedEnvironmentDaprComponentProvisioningState. + */ + public static final ConnectedEnvironmentDaprComponentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ConnectedEnvironmentDaprComponentProvisioningState. + */ + public static final ConnectedEnvironmentDaprComponentProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ConnectedEnvironmentDaprComponentProvisioningState. + */ + public static final ConnectedEnvironmentDaprComponentProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value InProgress for ConnectedEnvironmentDaprComponentProvisioningState. + */ + public static final ConnectedEnvironmentDaprComponentProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates a new instance of ConnectedEnvironmentDaprComponentProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectedEnvironmentDaprComponentProvisioningState() { + } + + /** + * Creates or finds a ConnectedEnvironmentDaprComponentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectedEnvironmentDaprComponentProvisioningState. + */ + public static ConnectedEnvironmentDaprComponentProvisioningState fromString(String name) { + return fromString(name, ConnectedEnvironmentDaprComponentProvisioningState.class); + } + + /** + * Gets known ConnectedEnvironmentDaprComponentProvisioningState values. + * + * @return known ConnectedEnvironmentDaprComponentProvisioningState values. + */ + public static Collection values() { + return values(ConnectedEnvironmentDaprComponentProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentsCollection.java new file mode 100644 index 0000000000000..d03439d68121e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentDaprComponentsCollection.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentDaprComponentInner; +import java.io.IOException; +import java.util.List; + +/** + * Collection of Dapr Components for Environments. + */ +@Fluent +public final class ConnectedEnvironmentDaprComponentsCollection + implements JsonSerializable { + /* + * Collection of Dapr component resources. + */ + private List value; + + /* + * Link to next page of resources. + */ + private String nextLink; + + /** + * Creates an instance of ConnectedEnvironmentDaprComponentsCollection class. + */ + public ConnectedEnvironmentDaprComponentsCollection() { + } + + /** + * Get the value property: Collection of Dapr component resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of Dapr component resources. + * + * @param value the value value to set. + * @return the ConnectedEnvironmentDaprComponentsCollection object itself. + */ + public ConnectedEnvironmentDaprComponentsCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ConnectedEnvironmentDaprComponentsCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentDaprComponentsCollection.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedEnvironmentDaprComponentsCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedEnvironmentDaprComponentsCollection if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedEnvironmentDaprComponentsCollection. + */ + public static ConnectedEnvironmentDaprComponentsCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedEnvironmentDaprComponentsCollection deserializedConnectedEnvironmentDaprComponentsCollection + = new ConnectedEnvironmentDaprComponentsCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ConnectedEnvironmentDaprComponentInner.fromJson(reader1)); + deserializedConnectedEnvironmentDaprComponentsCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedConnectedEnvironmentDaprComponentsCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedEnvironmentDaprComponentsCollection; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java index 4ba039d9a39c7..9d384a0f3a12b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java @@ -17,6 +17,16 @@ @Fluent public final class ConnectedEnvironmentStorageProperties implements JsonSerializable { + /* + * Provisioning state of the storage. + */ + private ConnectedEnvironmentStorageProvisioningState provisioningState; + + /* + * Any errors that occurred during deployment or deployment validation + */ + private String deploymentErrors; + /* * Azure file properties */ @@ -33,6 +43,24 @@ public final class ConnectedEnvironmentStorageProperties public ConnectedEnvironmentStorageProperties() { } + /** + * Get the provisioningState property: Provisioning state of the storage. + * + * @return the provisioningState value. + */ + public ConnectedEnvironmentStorageProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. + * + * @return the deploymentErrors value. + */ + public String deploymentErrors() { + return this.deploymentErrors; + } + /** * Get the azureFile property: Azure file properties. * @@ -114,7 +142,12 @@ public static ConnectedEnvironmentStorageProperties fromJson(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("azureFile".equals(fieldName)) { + if ("provisioningState".equals(fieldName)) { + deserializedConnectedEnvironmentStorageProperties.provisioningState + = ConnectedEnvironmentStorageProvisioningState.fromString(reader.getString()); + } else if ("deploymentErrors".equals(fieldName)) { + deserializedConnectedEnvironmentStorageProperties.deploymentErrors = reader.getString(); + } else if ("azureFile".equals(fieldName)) { deserializedConnectedEnvironmentStorageProperties.azureFile = AzureFileProperties.fromJson(reader); } else if ("smb".equals(fieldName)) { deserializedConnectedEnvironmentStorageProperties.smb = SmbStorage.fromJson(reader); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProvisioningState.java new file mode 100644 index 0000000000000..fc1cb16eeec40 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning state of the storage. + */ +public final class ConnectedEnvironmentStorageProvisioningState + extends ExpandableStringEnum { + /** + * Static value Succeeded for ConnectedEnvironmentStorageProvisioningState. + */ + public static final ConnectedEnvironmentStorageProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ConnectedEnvironmentStorageProvisioningState. + */ + public static final ConnectedEnvironmentStorageProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ConnectedEnvironmentStorageProvisioningState. + */ + public static final ConnectedEnvironmentStorageProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value InProgress for ConnectedEnvironmentStorageProvisioningState. + */ + public static final ConnectedEnvironmentStorageProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates a new instance of ConnectedEnvironmentStorageProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectedEnvironmentStorageProvisioningState() { + } + + /** + * Creates or finds a ConnectedEnvironmentStorageProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectedEnvironmentStorageProvisioningState. + */ + public static ConnectedEnvironmentStorageProvisioningState fromString(String name) { + return fromString(name, ConnectedEnvironmentStorageProvisioningState.class); + } + + /** + * Gets known ConnectedEnvironmentStorageProvisioningState values. + * + * @return known ConnectedEnvironmentStorageProvisioningState values. + */ + public static Collection values() { + return values(ConnectedEnvironmentStorageProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java index 58a536c24fb91..41e29633b7502 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java @@ -75,15 +75,11 @@ Response getWithResponse(String resourceGroupName, String connected * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 Response}. */ - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, - Context context); + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); /** * Deletes the specified Certificate. @@ -91,12 +87,12 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); /** * Get the specified Certificate. @@ -128,8 +124,7 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); @@ -140,12 +135,10 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new Certificate resource. 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 f02d74ed72266..c63f26923847f 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 @@ -23,7 +23,7 @@ public interface ConnectedEnvironmentsDaprComponents { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); + PagedIterable list(String resourceGroupName, String connectedEnvironmentName); /** * Get the Dapr Components for a connected environment. @@ -37,7 +37,8 @@ public interface ConnectedEnvironmentsDaprComponents { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); + PagedIterable list(String resourceGroupName, String connectedEnvironmentName, + Context context); /** * Get a dapr component. @@ -52,8 +53,8 @@ public interface ConnectedEnvironmentsDaprComponents { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dapr component along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context); + Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context); /** * Get a dapr component. @@ -67,7 +68,8 @@ Response getWithResponse(String resourceGroupName, String connect * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dapr component. */ - DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName); + ConnectedEnvironmentDaprComponent get(String resourceGroupName, String connectedEnvironmentName, + String componentName); /** * Delete a Dapr Component. @@ -77,15 +79,11 @@ Response getWithResponse(String resourceGroupName, String connect * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 Response}. */ - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, - Context context); + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); /** * Delete a Dapr Component. @@ -95,12 +93,12 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); /** * List secrets for a dapr component. @@ -142,7 +140,7 @@ Response listSecretsWithResponse(String resourceGroupName * @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); + ConnectedEnvironmentDaprComponent getById(String id); /** * Get a dapr component. @@ -155,7 +153,7 @@ Response listSecretsWithResponse(String resourceGroupName * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete a Dapr Component. @@ -164,8 +162,7 @@ Response listSecretsWithResponse(String resourceGroupName * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); @@ -178,18 +175,16 @@ Response listSecretsWithResponse(String resourceGroupName * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new DaprComponent resource. + * Begins definition for a new ConnectedEnvironmentDaprComponent resource. * * @param name resource name. - * @return the first stage of the new DaprComponent definition. + * @return the first stage of the new ConnectedEnvironmentDaprComponent definition. */ - DaprComponent.DefinitionStages.Blank define(String name); + ConnectedEnvironmentDaprComponent.DefinitionStages.Blank define(String name); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java index 3b4ba9cde372c..b78951f508740 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java @@ -75,15 +75,11 @@ Response getWithResponse(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.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 Response}. */ - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, - Context context); + void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); /** * Delete storage for a connectedEnvironment. @@ -91,12 +87,12 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); + void delete(String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); /** * Get storage for a connectedEnvironment. @@ -128,8 +124,7 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); @@ -140,12 +135,10 @@ Response deleteWithResponse(String resourceGroupName, String connectedEnvi * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new ConnectedEnvironmentStorage resource. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsLabelHistories.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsLabelHistories.java new file mode 100644 index 0000000000000..e2eb26ec1bdd8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsLabelHistories.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ContainerAppsLabelHistories. + */ +public interface ContainerAppsLabelHistories { + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedIterable}. + */ + PagedIterable listLabelHistory(String resourceGroupName, String containerAppName); + + /** + * Get the Label History for a given Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Label History for a given Container App as paginated response with {@link PagedIterable}. + */ + PagedIterable listLabelHistory(String resourceGroupName, String containerAppName, String filter, + Context context); + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label along with {@link Response}. + */ + Response getLabelHistoryWithResponse(String resourceGroupName, String containerAppName, + String labelName, Context context); + + /** + * Get the history of a label. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param labelName Name of the Container App label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the history of a label. + */ + LabelHistory getLabelHistory(String resourceGroupName, String containerAppName, String labelName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java index 5e43d89033e18..b005c87e034d4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java @@ -31,6 +31,11 @@ public final class ContainerResources implements JsonSerializable getWithResponse(String resourceGroupName, String environ DaprComponent get(String resourceGroupName, String environmentName, String componentName); /** - * Creates or updates a Dapr Component. + * Delete a Dapr Component. * - * Creates or updates a Dapr Component in a Managed Environment. + * Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param 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 environmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context); /** - * Creates or updates a Dapr Component. + * Delete a Dapr Component. * - * Creates or updates a Dapr Component in a Managed Environment. + * Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. */ - DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope); + void delete(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. + * List secrets for a dapr component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -120,15 +113,13 @@ DaprComponent createOrUpdate(String resourceGroupName, String environmentName, S * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown 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(String resourceGroupName, String environmentName, String componentName, - Context context); + 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -137,36 +128,68 @@ Response deleteWithResponse(String resourceGroupName, String environmentNa * @throws com.azure.resourcemanager.appcontainers.models.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 environmentName, String componentName); + DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, 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 environmentName Name of the Managed 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 environmentName, - 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 environmentName Name of the Managed Environment. - * @param componentName Name of the 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. */ - DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); + void deleteById(String id); + + /** + * Delete a Dapr Component. + * + * Delete a Dapr Component from a Managed Environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown 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/HttpRoute.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRoute.java new file mode 100644 index 0000000000000..f1c4fdd5ca000 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRoute.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Http Routes configuration, including paths to match on and whether or not rewrites are to be done. + */ +@Fluent +public final class HttpRoute implements JsonSerializable { + /* + * Conditions route will match on + */ + private HttpRouteMatch match; + + /* + * Once route is matched, what is the desired action + */ + private HttpRouteAction action; + + /** + * Creates an instance of HttpRoute class. + */ + public HttpRoute() { + } + + /** + * Get the match property: Conditions route will match on. + * + * @return the match value. + */ + public HttpRouteMatch match() { + return this.match; + } + + /** + * Set the match property: Conditions route will match on. + * + * @param match the match value to set. + * @return the HttpRoute object itself. + */ + public HttpRoute withMatch(HttpRouteMatch match) { + this.match = match; + return this; + } + + /** + * Get the action property: Once route is matched, what is the desired action. + * + * @return the action value. + */ + public HttpRouteAction action() { + return this.action; + } + + /** + * Set the action property: Once route is matched, what is the desired action. + * + * @param action the action value to set. + * @return the HttpRoute object itself. + */ + public HttpRoute withAction(HttpRouteAction action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (match() != null) { + match().validate(); + } + if (action() != null) { + action().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("match", this.match); + jsonWriter.writeJsonField("action", this.action); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRoute from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRoute if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the HttpRoute. + */ + public static HttpRoute fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRoute deserializedHttpRoute = new HttpRoute(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("match".equals(fieldName)) { + deserializedHttpRoute.match = HttpRouteMatch.fromJson(reader); + } else if ("action".equals(fieldName)) { + deserializedHttpRoute.action = HttpRouteAction.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRoute; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteAction.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteAction.java new file mode 100644 index 0000000000000..8e3e1af00936f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteAction.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Action to perform once matching of routes is done. + */ +@Fluent +public final class HttpRouteAction implements JsonSerializable { + /* + * Rewrite prefix, default is no rewrites + */ + private String prefixRewrite; + + /** + * Creates an instance of HttpRouteAction class. + */ + public HttpRouteAction() { + } + + /** + * Get the prefixRewrite property: Rewrite prefix, default is no rewrites. + * + * @return the prefixRewrite value. + */ + public String prefixRewrite() { + return this.prefixRewrite; + } + + /** + * Set the prefixRewrite property: Rewrite prefix, default is no rewrites. + * + * @param prefixRewrite the prefixRewrite value to set. + * @return the HttpRouteAction object itself. + */ + public HttpRouteAction withPrefixRewrite(String prefixRewrite) { + this.prefixRewrite = prefixRewrite; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("prefixRewrite", this.prefixRewrite); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteAction if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the HttpRouteAction. + */ + public static HttpRouteAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteAction deserializedHttpRouteAction = new HttpRouteAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixRewrite".equals(fieldName)) { + deserializedHttpRouteAction.prefixRewrite = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteAction; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfig.java new file mode 100644 index 0000000000000..f71a6154c09d6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfig.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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner; + +/** + * An immutable client-side representation of HttpRouteConfig. + */ +public interface HttpRouteConfig { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Http Route Config properties. + * + * @return the properties value. + */ + HttpRouteConfigProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner object. + * + * @return the inner object. + */ + HttpRouteConfigInner innerModel(); + + /** + * The entirety of the HttpRouteConfig definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The HttpRouteConfig definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the HttpRouteConfig definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the HttpRouteConfig 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 HttpRouteConfig definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + HttpRouteConfig create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + HttpRouteConfig create(Context context); + } + + /** + * The stage of the HttpRouteConfig definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Http Route Config properties. + * + * @param properties Http Route Config properties. + * @return the next definition stage. + */ + WithCreate withProperties(HttpRouteConfigProperties properties); + } + } + + /** + * Begins update for the HttpRouteConfig resource. + * + * @return the stage of resource update. + */ + HttpRouteConfig.Update update(); + + /** + * The template for HttpRouteConfig update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + HttpRouteConfig apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + HttpRouteConfig apply(Context context); + } + + /** + * The HttpRouteConfig update stages. + */ + interface UpdateStages { + /** + * The stage of the HttpRouteConfig update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Http Route Config properties. + * + * @param properties Http Route Config properties. + * @return the next definition stage. + */ + Update withProperties(HttpRouteConfigProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + HttpRouteConfig refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + HttpRouteConfig refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigCollection.java new file mode 100644 index 0000000000000..d77770dfae06f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigCollection.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRouteConfigInner; +import java.io.IOException; +import java.util.List; + +/** + * Collection of Advanced Ingress Routing Config resources. + */ +@Fluent +public final class HttpRouteConfigCollection implements JsonSerializable { + /* + * Collection of resources. + */ + private List value; + + /* + * Link to next page of resources. + */ + private String nextLink; + + /** + * Creates an instance of HttpRouteConfigCollection class. + */ + public HttpRouteConfigCollection() { + } + + /** + * 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 HttpRouteConfigCollection object itself. + */ + public HttpRouteConfigCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model HttpRouteConfigCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HttpRouteConfigCollection.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteConfigCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteConfigCollection if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HttpRouteConfigCollection. + */ + public static HttpRouteConfigCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteConfigCollection deserializedHttpRouteConfigCollection = new HttpRouteConfigCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> HttpRouteConfigInner.fromJson(reader1)); + deserializedHttpRouteConfigCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedHttpRouteConfigCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteConfigCollection; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigProperties.java new file mode 100644 index 0000000000000..a871be45d283a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigProperties.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Http Route Config properties. + */ +@Fluent +public final class HttpRouteConfigProperties implements JsonSerializable { + /* + * The provisioning state of the Http Route Config in cluster + */ + private HttpRouteProvisioningState provisioningState; + + /* + * List of errors when trying to reconcile http routes + */ + private List provisioningErrors; + + /* + * FQDN of the route resource. + */ + private String fqdn; + + /* + * Custom domain bindings for http Routes' hostnames. + */ + private List customDomains; + + /* + * Routing Rules for http route resource. + */ + private List rules; + + /** + * Creates an instance of HttpRouteConfigProperties class. + */ + public HttpRouteConfigProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the Http Route Config in cluster. + * + * @return the provisioningState value. + */ + public HttpRouteProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningErrors property: List of errors when trying to reconcile http routes. + * + * @return the provisioningErrors value. + */ + public List provisioningErrors() { + return this.provisioningErrors; + } + + /** + * Get the fqdn property: FQDN of the route resource. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the customDomains property: Custom domain bindings for http Routes' hostnames. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.customDomains; + } + + /** + * Set the customDomains property: Custom domain bindings for http Routes' hostnames. + * + * @param customDomains the customDomains value to set. + * @return the HttpRouteConfigProperties object itself. + */ + public HttpRouteConfigProperties withCustomDomains(List customDomains) { + this.customDomains = customDomains; + return this; + } + + /** + * Get the rules property: Routing Rules for http route resource. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: Routing Rules for http route resource. + * + * @param rules the rules value to set. + * @return the HttpRouteConfigProperties object itself. + */ + public HttpRouteConfigProperties withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (provisioningErrors() != null) { + provisioningErrors().forEach(e -> e.validate()); + } + if (customDomains() != null) { + customDomains().forEach(e -> e.validate()); + } + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteConfigProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteConfigProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the HttpRouteConfigProperties. + */ + public static HttpRouteConfigProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteConfigProperties deserializedHttpRouteConfigProperties = new HttpRouteConfigProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedHttpRouteConfigProperties.provisioningState + = HttpRouteProvisioningState.fromString(reader.getString()); + } else if ("provisioningErrors".equals(fieldName)) { + List provisioningErrors + = reader.readArray(reader1 -> HttpRouteProvisioningErrors.fromJson(reader1)); + deserializedHttpRouteConfigProperties.provisioningErrors = provisioningErrors; + } else if ("fqdn".equals(fieldName)) { + deserializedHttpRouteConfigProperties.fqdn = reader.getString(); + } else if ("customDomains".equals(fieldName)) { + List customDomains = reader.readArray(reader1 -> CustomDomain.fromJson(reader1)); + deserializedHttpRouteConfigProperties.customDomains = customDomains; + } else if ("rules".equals(fieldName)) { + List rules = reader.readArray(reader1 -> HttpRouteRule.fromJson(reader1)); + deserializedHttpRouteConfigProperties.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteConfigProperties; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigs.java new file mode 100644 index 0000000000000..32d9ae58df988 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteConfigs.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights 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 HttpRouteConfigs. + */ +public interface HttpRouteConfigs { + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, String httpRouteName, + Context context); + + /** + * Get the specified Managed Http Route Config. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Managed Http Route Config. + */ + HttpRouteConfig get(String resourceGroupName, String environmentName, String httpRouteName); + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String environmentName, String httpRouteName, + Context context); + + /** + * Deletes the specified Managed Http Route. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String httpRouteName); + + /** + * Get the Managed Http Routes 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 Http Routes in a given managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Managed Http Routes 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 Http Routes in a given managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get the specified Managed Http Route Config. + * + * @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 Http Route Config along with {@link Response}. + */ + HttpRouteConfig getById(String id); + + /** + * Get the specified Managed Http Route Config. + * + * @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 Http Route Config along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified Managed Http Route. + * + * @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 Http Route. + * + * @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 HttpRouteConfig resource. + * + * @param name resource name. + * @return the first stage of the new HttpRouteConfig definition. + */ + HttpRouteConfig.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteMatch.java new file mode 100644 index 0000000000000..ff553b2b59d3f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteMatch.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Criteria to match on. + */ +@Fluent +public final class HttpRouteMatch implements JsonSerializable { + /* + * match on all prefix's. Not exact + */ + private String prefix; + + /* + * match on exact path + */ + private String path; + + /* + * match on all prefix's. Not exact + */ + private String pathSeparatedPrefix; + + /* + * path case sensitive, default is true + */ + private Boolean caseSensitive; + + /** + * Creates an instance of HttpRouteMatch class. + */ + public HttpRouteMatch() { + } + + /** + * Get the prefix property: match on all prefix's. Not exact. + * + * @return the prefix value. + */ + public String prefix() { + return this.prefix; + } + + /** + * Set the prefix property: match on all prefix's. Not exact. + * + * @param prefix the prefix value to set. + * @return the HttpRouteMatch object itself. + */ + public HttpRouteMatch withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the path property: match on exact path. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: match on exact path. + * + * @param path the path value to set. + * @return the HttpRouteMatch object itself. + */ + public HttpRouteMatch withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the pathSeparatedPrefix property: match on all prefix's. Not exact. + * + * @return the pathSeparatedPrefix value. + */ + public String pathSeparatedPrefix() { + return this.pathSeparatedPrefix; + } + + /** + * Set the pathSeparatedPrefix property: match on all prefix's. Not exact. + * + * @param pathSeparatedPrefix the pathSeparatedPrefix value to set. + * @return the HttpRouteMatch object itself. + */ + public HttpRouteMatch withPathSeparatedPrefix(String pathSeparatedPrefix) { + this.pathSeparatedPrefix = pathSeparatedPrefix; + return this; + } + + /** + * Get the caseSensitive property: path case sensitive, default is true. + * + * @return the caseSensitive value. + */ + public Boolean caseSensitive() { + return this.caseSensitive; + } + + /** + * Set the caseSensitive property: path case sensitive, default is true. + * + * @param caseSensitive the caseSensitive value to set. + * @return the HttpRouteMatch object itself. + */ + public HttpRouteMatch withCaseSensitive(Boolean caseSensitive) { + this.caseSensitive = caseSensitive; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("prefix", this.prefix); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeStringField("pathSeparatedPrefix", this.pathSeparatedPrefix); + jsonWriter.writeBooleanField("caseSensitive", this.caseSensitive); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteMatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteMatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the HttpRouteMatch. + */ + public static HttpRouteMatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteMatch deserializedHttpRouteMatch = new HttpRouteMatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefix".equals(fieldName)) { + deserializedHttpRouteMatch.prefix = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedHttpRouteMatch.path = reader.getString(); + } else if ("pathSeparatedPrefix".equals(fieldName)) { + deserializedHttpRouteMatch.pathSeparatedPrefix = reader.getString(); + } else if ("caseSensitive".equals(fieldName)) { + deserializedHttpRouteMatch.caseSensitive = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteMatch; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteProvisioningErrors.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteProvisioningErrors.java new file mode 100644 index 0000000000000..df48692451e79 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteProvisioningErrors.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * List of provisioning errors for a http route config object. + */ +@Immutable +public final class HttpRouteProvisioningErrors implements JsonSerializable { + /* + * Timestamp error occured at + */ + private OffsetDateTime timestamp; + + /* + * Description or error message + */ + private String message; + + /** + * Creates an instance of HttpRouteProvisioningErrors class. + */ + public HttpRouteProvisioningErrors() { + } + + /** + * Get the timestamp property: Timestamp error occured at. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Get the message property: Description or error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteProvisioningErrors from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteProvisioningErrors if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the HttpRouteProvisioningErrors. + */ + public static HttpRouteProvisioningErrors fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteProvisioningErrors deserializedHttpRouteProvisioningErrors = new HttpRouteProvisioningErrors(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timestamp".equals(fieldName)) { + deserializedHttpRouteProvisioningErrors.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("message".equals(fieldName)) { + deserializedHttpRouteProvisioningErrors.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteProvisioningErrors; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteProvisioningState.java new file mode 100644 index 0000000000000..429f0773f7683 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteProvisioningState.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state. + */ +public final class HttpRouteProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Waiting for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState WAITING = fromString("Waiting"); + + /** + * Static value Updating for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Pending for HttpRouteProvisioningState. + */ + public static final HttpRouteProvisioningState PENDING = fromString("Pending"); + + /** + * Creates a new instance of HttpRouteProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HttpRouteProvisioningState() { + } + + /** + * Creates or finds a HttpRouteProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HttpRouteProvisioningState. + */ + public static HttpRouteProvisioningState fromString(String name) { + return fromString(name, HttpRouteProvisioningState.class); + } + + /** + * Gets known HttpRouteProvisioningState values. + * + * @return known HttpRouteProvisioningState values. + */ + public static Collection values() { + return values(HttpRouteProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteRule.java new file mode 100644 index 0000000000000..a0bce4285c7f6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteRule.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Http Route rule. + */ +@Fluent +public final class HttpRouteRule implements JsonSerializable { + /* + * Targets- container apps, revisions, labels + */ + private List targets; + + /* + * Routing configuration that will allow matches on specific paths/headers. + */ + private List routes; + + /* + * Description of rule. Optional. + */ + private String description; + + /** + * Creates an instance of HttpRouteRule class. + */ + public HttpRouteRule() { + } + + /** + * Get the targets property: Targets- container apps, revisions, labels. + * + * @return the targets value. + */ + public List targets() { + return this.targets; + } + + /** + * Set the targets property: Targets- container apps, revisions, labels. + * + * @param targets the targets value to set. + * @return the HttpRouteRule object itself. + */ + public HttpRouteRule withTargets(List targets) { + this.targets = targets; + return this; + } + + /** + * Get the routes property: Routing configuration that will allow matches on specific paths/headers. + * + * @return the routes value. + */ + public List routes() { + return this.routes; + } + + /** + * Set the routes property: Routing configuration that will allow matches on specific paths/headers. + * + * @param routes the routes value to set. + * @return the HttpRouteRule object itself. + */ + public HttpRouteRule withRoutes(List routes) { + this.routes = routes; + return this; + } + + /** + * Get the description property: Description of rule. Optional. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of rule. Optional. + * + * @param description the description value to set. + * @return the HttpRouteRule object itself. + */ + public HttpRouteRule withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targets() != null) { + targets().forEach(e -> e.validate()); + } + if (routes() != null) { + routes().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("targets", this.targets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("routes", this.routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteRule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the HttpRouteRule. + */ + public static HttpRouteRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteRule deserializedHttpRouteRule = new HttpRouteRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targets".equals(fieldName)) { + List targets = reader.readArray(reader1 -> HttpRouteTarget.fromJson(reader1)); + deserializedHttpRouteRule.targets = targets; + } else if ("routes".equals(fieldName)) { + List routes = reader.readArray(reader1 -> HttpRoute.fromJson(reader1)); + deserializedHttpRouteRule.routes = routes; + } else if ("description".equals(fieldName)) { + deserializedHttpRouteRule.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteRule; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteTarget.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteTarget.java new file mode 100644 index 0000000000000..54ea85565b736 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRouteTarget.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Targets - Container App Names, Revision Names, Labels. + */ +@Fluent +public final class HttpRouteTarget implements JsonSerializable { + /* + * Container App Name to route requests to + */ + private String containerApp; + + /* + * Revision to route requests to + */ + private String revision; + + /* + * Label/Revision to route requests to + */ + private String label; + + /* + * Weighted routing + */ + private Integer weight; + + /** + * Creates an instance of HttpRouteTarget class. + */ + public HttpRouteTarget() { + } + + /** + * Get the containerApp property: Container App Name to route requests to. + * + * @return the containerApp value. + */ + public String containerApp() { + return this.containerApp; + } + + /** + * Set the containerApp property: Container App Name to route requests to. + * + * @param containerApp the containerApp value to set. + * @return the HttpRouteTarget object itself. + */ + public HttpRouteTarget withContainerApp(String containerApp) { + this.containerApp = containerApp; + return this; + } + + /** + * Get the revision property: Revision to route requests to. + * + * @return the revision value. + */ + public String revision() { + return this.revision; + } + + /** + * Set the revision property: Revision to route requests to. + * + * @param revision the revision value to set. + * @return the HttpRouteTarget object itself. + */ + public HttpRouteTarget withRevision(String revision) { + this.revision = revision; + return this; + } + + /** + * Get the label property: Label/Revision to route requests to. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Set the label property: Label/Revision to route requests to. + * + * @param label the label value to set. + * @return the HttpRouteTarget object itself. + */ + public HttpRouteTarget withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the weight property: Weighted routing. + * + * @return the weight value. + */ + public Integer weight() { + return this.weight; + } + + /** + * Set the weight property: Weighted routing. + * + * @param weight the weight value to set. + * @return the HttpRouteTarget object itself. + */ + public HttpRouteTarget withWeight(Integer weight) { + this.weight = weight; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containerApp() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property containerApp in model HttpRouteTarget")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HttpRouteTarget.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("containerApp", this.containerApp); + jsonWriter.writeStringField("revision", this.revision); + jsonWriter.writeStringField("label", this.label); + jsonWriter.writeNumberField("weight", this.weight); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpRouteTarget from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpRouteTarget if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HttpRouteTarget. + */ + public static HttpRouteTarget fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpRouteTarget deserializedHttpRouteTarget = new HttpRouteTarget(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("containerApp".equals(fieldName)) { + deserializedHttpRouteTarget.containerApp = reader.getString(); + } else if ("revision".equals(fieldName)) { + deserializedHttpRouteTarget.revision = reader.getString(); + } else if ("label".equals(fieldName)) { + deserializedHttpRouteTarget.label = reader.getString(); + } else if ("weight".equals(fieldName)) { + deserializedHttpRouteTarget.weight = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpRouteTarget; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistory.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistory.java new file mode 100644 index 0000000000000..daa91352abf1a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistory.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner; + +/** + * An immutable client-side representation of LabelHistory. + */ +public interface LabelHistory { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Container App Label History resource specific properties. + * + * @return the properties value. + */ + LabelHistoryProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner object. + * + * @return the inner object. + */ + LabelHistoryInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryCollection.java new file mode 100644 index 0000000000000..7783fc88cbd7c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryCollection.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.fluent.models.LabelHistoryInner; +import java.io.IOException; +import java.util.List; + +/** + * Container App Label History collection ARM resource. + */ +@Fluent +public final class LabelHistoryCollection implements JsonSerializable { + /* + * Collection of resources. + */ + private List value; + + /* + * Link to next page of resources. + */ + private String nextLink; + + /** + * Creates an instance of LabelHistoryCollection class. + */ + public LabelHistoryCollection() { + } + + /** + * 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 LabelHistoryCollection object itself. + */ + public LabelHistoryCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model LabelHistoryCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LabelHistoryCollection.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelHistoryCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelHistoryCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LabelHistoryCollection. + */ + public static LabelHistoryCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelHistoryCollection deserializedLabelHistoryCollection = new LabelHistoryCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LabelHistoryInner.fromJson(reader1)); + deserializedLabelHistoryCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLabelHistoryCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLabelHistoryCollection; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryProperties.java new file mode 100644 index 0000000000000..c03954e63f250 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Container App Label History resource specific properties. + */ +@Immutable +public final class LabelHistoryProperties implements JsonSerializable { + /* + * List of label history records. + */ + private List records; + + /** + * Creates an instance of LabelHistoryProperties class. + */ + public LabelHistoryProperties() { + } + + /** + * Get the records property: List of label history records. + * + * @return the records value. + */ + public List records() { + return this.records; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (records() != null) { + records().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelHistoryProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelHistoryProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelHistoryProperties. + */ + public static LabelHistoryProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelHistoryProperties deserializedLabelHistoryProperties = new LabelHistoryProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("records".equals(fieldName)) { + List records + = reader.readArray(reader1 -> LabelHistoryRecordItem.fromJson(reader1)); + deserializedLabelHistoryProperties.records = records; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelHistoryProperties; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryRecordItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryRecordItem.java new file mode 100644 index 0000000000000..7efb2763b11e6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LabelHistoryRecordItem.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Container App Label History Item resource specific properties. + */ +@Immutable +public final class LabelHistoryRecordItem implements JsonSerializable { + /* + * Container App revision name that label was applied to. + */ + private String revision; + + /* + * Timestamp describing when the label was applied to the revision. + */ + private OffsetDateTime start; + + /* + * Timestamp describing when the label was removed from the revision. Only meaningful when the label is currently + * applied to the revision. + */ + private OffsetDateTime stop; + + /** + * Creates an instance of LabelHistoryRecordItem class. + */ + public LabelHistoryRecordItem() { + } + + /** + * Get the revision property: Container App revision name that label was applied to. + * + * @return the revision value. + */ + public String revision() { + return this.revision; + } + + /** + * Get the start property: Timestamp describing when the label was applied to the revision. + * + * @return the start value. + */ + public OffsetDateTime start() { + return this.start; + } + + /** + * Get the stop property: Timestamp describing when the label was removed from the revision. Only meaningful when + * the label is currently applied to the revision. + * + * @return the stop value. + */ + public OffsetDateTime stop() { + return this.stop; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelHistoryRecordItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelHistoryRecordItem if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelHistoryRecordItem. + */ + public static LabelHistoryRecordItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelHistoryRecordItem deserializedLabelHistoryRecordItem = new LabelHistoryRecordItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("revision".equals(fieldName)) { + deserializedLabelHistoryRecordItem.revision = reader.getString(); + } else if ("start".equals(fieldName)) { + deserializedLabelHistoryRecordItem.start = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("stop".equals(fieldName)) { + deserializedLabelHistoryRecordItem.stop = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedLabelHistoryRecordItem; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurationCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurationCollection.java new file mode 100644 index 0000000000000..d6530f31c4b3a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurationCollection.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.appcontainers.fluent.models.MaintenanceConfigurationResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of list maintenance configuration resources. + */ +@Fluent +public final class MaintenanceConfigurationCollection implements JsonSerializable { + /* + * Results of the list maintenance configuration resources. + */ + private List value; + + /* + * Link for next page of results. + */ + private String nextLink; + + /** + * Creates an instance of MaintenanceConfigurationCollection class. + */ + public MaintenanceConfigurationCollection() { + } + + /** + * Get the value property: Results of the list maintenance configuration resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Results of the list maintenance configuration resources. + * + * @param value the value value to set. + * @return the MaintenanceConfigurationCollection object itself. + */ + public MaintenanceConfigurationCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link for next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceConfigurationCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceConfigurationCollection if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceConfigurationCollection. + */ + public static MaintenanceConfigurationCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceConfigurationCollection deserializedMaintenanceConfigurationCollection + = new MaintenanceConfigurationCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MaintenanceConfigurationResourceInner.fromJson(reader1)); + deserializedMaintenanceConfigurationCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMaintenanceConfigurationCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceConfigurationCollection; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurationResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurationResource.java new file mode 100644 index 0000000000000..d870595043376 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurationResource.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.MaintenanceConfigurationResourceInner; +import java.util.List; + +/** + * An immutable client-side representation of MaintenanceConfigurationResource. + */ +public interface MaintenanceConfigurationResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the scheduledEntries property: List of maintenance schedules for a managed environment. + * + * @return the scheduledEntries value. + */ + List scheduledEntries(); + + /** + * 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.MaintenanceConfigurationResourceInner + * object. + * + * @return the inner object. + */ + MaintenanceConfigurationResourceInner innerModel(); + + /** + * The entirety of the MaintenanceConfigurationResource definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The MaintenanceConfigurationResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MaintenanceConfigurationResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the MaintenanceConfigurationResource 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 The name of the Managed Environment. + * @return the next definition stage. + */ + WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + } + + /** + * The stage of the MaintenanceConfigurationResource 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.WithScheduledEntries { + /** + * Executes the create request. + * + * @return the created resource. + */ + MaintenanceConfigurationResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MaintenanceConfigurationResource create(Context context); + } + + /** + * The stage of the MaintenanceConfigurationResource definition allowing to specify scheduledEntries. + */ + interface WithScheduledEntries { + /** + * Specifies the scheduledEntries property: List of maintenance schedules for a managed environment.. + * + * @param scheduledEntries List of maintenance schedules for a managed environment. + * @return the next definition stage. + */ + WithCreate withScheduledEntries(List scheduledEntries); + } + } + + /** + * Begins update for the MaintenanceConfigurationResource resource. + * + * @return the stage of resource update. + */ + MaintenanceConfigurationResource.Update update(); + + /** + * The template for MaintenanceConfigurationResource update. + */ + interface Update extends UpdateStages.WithScheduledEntries { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MaintenanceConfigurationResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MaintenanceConfigurationResource apply(Context context); + } + + /** + * The MaintenanceConfigurationResource update stages. + */ + interface UpdateStages { + /** + * The stage of the MaintenanceConfigurationResource update allowing to specify scheduledEntries. + */ + interface WithScheduledEntries { + /** + * Specifies the scheduledEntries property: List of maintenance schedules for a managed environment.. + * + * @param scheduledEntries List of maintenance schedules for a managed environment. + * @return the next definition stage. + */ + Update withScheduledEntries(List scheduledEntries); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MaintenanceConfigurationResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MaintenanceConfigurationResource refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurations.java new file mode 100644 index 0000000000000..e5f4c1f4c4303 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MaintenanceConfigurations.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of MaintenanceConfigurations. + */ +public interface MaintenanceConfigurations { + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified Managed Environment as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all maintenance configurations in the specified Managed Environment as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, + Context context); + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown 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 configName, + Context context); + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.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 configName); + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, + String configName, Context context); + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment. + */ + MaintenanceConfigurationResource get(String resourceGroupName, String environmentName, String configName); + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response}. + */ + MaintenanceConfigurationResource getById(String id); + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the maintenance configuration of a ManagedEnvironment along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new MaintenanceConfigurationResource resource. + * + * @param name resource name. + * @return the first stage of the new MaintenanceConfigurationResource definition. + */ + MaintenanceConfigurationResource.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 116461604263f..faf63394a9127 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 @@ -154,6 +154,13 @@ public interface ManagedEnvironment { */ Boolean zoneRedundant(); + /** + * Gets the availabilityZones property: The list of availability zones to use for managed environment. + * + * @return the availabilityZones value. + */ + List availabilityZones(); + /** * Gets the customDomainConfiguration property: Custom domain configuration for the environment. * @@ -310,11 +317,12 @@ interface WithResourceGroup { * The stage of the ManagedEnvironment definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithDaprAIInstrumentationKey, - DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, - DefinitionStages.WithAppLogsConfiguration, DefinitionStages.WithAppInsightsConfiguration, - DefinitionStages.WithOpenTelemetryConfiguration, DefinitionStages.WithZoneRedundant, + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithKind, DefinitionStages.WithIdentity, + DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, + DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, + DefinitionStages.WithAppInsightsConfiguration, DefinitionStages.WithOpenTelemetryConfiguration, + DefinitionStages.WithZoneRedundant, DefinitionStages.WithAvailabilityZones, DefinitionStages.WithCustomDomainConfiguration, DefinitionStages.WithWorkloadProfiles, DefinitionStages.WithKedaConfiguration, DefinitionStages.WithDaprConfiguration, DefinitionStages.WithInfrastructureResourceGroup, DefinitionStages.WithPeerAuthentication, @@ -475,6 +483,19 @@ interface WithZoneRedundant { WithCreate withZoneRedundant(Boolean zoneRedundant); } + /** + * The stage of the ManagedEnvironment definition allowing to specify availabilityZones. + */ + interface WithAvailabilityZones { + /** + * Specifies the availabilityZones property: The list of availability zones to use for managed environment. + * + * @param availabilityZones The list of availability zones to use for managed environment. + * @return the next definition stage. + */ + WithCreate withAvailabilityZones(List availabilityZones); + } + /** * The stage of the ManagedEnvironment definition allowing to specify customDomainConfiguration. */ @@ -601,9 +622,10 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateSta UpdateStages.WithDaprAIInstrumentationKey, UpdateStages.WithDaprAIConnectionString, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, UpdateStages.WithAppInsightsConfiguration, UpdateStages.WithOpenTelemetryConfiguration, - UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, - UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication, - UpdateStages.WithPeerTrafficConfiguration, UpdateStages.WithPublicNetworkAccess { + UpdateStages.WithAvailabilityZones, UpdateStages.WithCustomDomainConfiguration, + UpdateStages.WithWorkloadProfiles, UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, + UpdateStages.WithPeerAuthentication, UpdateStages.WithPeerTrafficConfiguration, + UpdateStages.WithPublicNetworkAccess { /** * Executes the update request. * @@ -751,6 +773,19 @@ interface WithOpenTelemetryConfiguration { Update withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); } + /** + * The stage of the ManagedEnvironment update allowing to specify availabilityZones. + */ + interface WithAvailabilityZones { + /** + * Specifies the availabilityZones property: The list of availability zones to use for managed environment. + * + * @param availabilityZones The list of availability zones to use for managed environment. + * @return the next definition stage. + */ + Update withAvailabilityZones(List availabilityZones); + } + /** * The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedIdentitySetting.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedIdentitySetting.java new file mode 100644 index 0000000000000..1fdac6a7e8cf6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedIdentitySetting.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Optional settings for a Managed Identity that is assigned to the Session pool. + */ +@Fluent +public final class ManagedIdentitySetting implements JsonSerializable { + /* + * The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for + * system-assigned identity. + */ + private String identity; + + /* + * Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. + */ + private IdentitySettingsLifeCycle lifecycle; + + /** + * Creates an instance of ManagedIdentitySetting class. + */ + public ManagedIdentitySetting() { + } + + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Session + * Pool, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Session + * Pool, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the ManagedIdentitySetting object itself. + */ + public ManagedIdentitySetting withIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the lifecycle property: Use to select the lifecycle stages of a Session Pool during which the Managed + * Identity should be available. + * + * @return the lifecycle value. + */ + public IdentitySettingsLifeCycle lifecycle() { + return this.lifecycle; + } + + /** + * Set the lifecycle property: Use to select the lifecycle stages of a Session Pool during which the Managed + * Identity should be available. + * + * @param lifecycle the lifecycle value to set. + * @return the ManagedIdentitySetting object itself. + */ + public ManagedIdentitySetting withLifecycle(IdentitySettingsLifeCycle lifecycle) { + this.lifecycle = lifecycle; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property identity in model ManagedIdentitySetting")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedIdentitySetting.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identity", this.identity); + jsonWriter.writeStringField("lifecycle", this.lifecycle == null ? null : this.lifecycle.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedIdentitySetting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedIdentitySetting if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedIdentitySetting. + */ + public static ManagedIdentitySetting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedIdentitySetting deserializedManagedIdentitySetting = new ManagedIdentitySetting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedManagedIdentitySetting.identity = reader.getString(); + } else if ("lifecycle".equals(fieldName)) { + deserializedManagedIdentitySetting.lifecycle + = IdentitySettingsLifeCycle.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedIdentitySetting; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityAutoGenerated.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityAutoGenerated.java new file mode 100644 index 0000000000000..9514c6bc28bbc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityAutoGenerated.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; +import java.util.UUID; + +/** + * Managed service identity (system assigned and/or user assigned identities). + */ +@Fluent +public final class ManagedServiceIdentityAutoGenerated + implements JsonSerializable { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + private UUID principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + private UUID tenantId; + + /* + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ + private ManagedServiceIdentityType type; + + /* + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will + * be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentityAutoGenerated class. + */ + public ManagedServiceIdentityAutoGenerated() { + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @param type the type value to set. + * @return the ManagedServiceIdentityAutoGenerated object itself. + */ + public ManagedServiceIdentityAutoGenerated withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentityAutoGenerated object itself. + */ + public ManagedServiceIdentityAutoGenerated + withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property type in model ManagedServiceIdentityAutoGenerated")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentityAutoGenerated.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentityAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentityAutoGenerated if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServiceIdentityAutoGenerated. + */ + public static ManagedServiceIdentityAutoGenerated fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentityAutoGenerated deserializedManagedServiceIdentityAutoGenerated + = new ManagedServiceIdentityAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentityAutoGenerated.type + = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedManagedServiceIdentityAutoGenerated.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedServiceIdentityAutoGenerated.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentityAutoGenerated.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentityAutoGenerated; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java index 5f83c296e50c7..bcfd720900efa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java @@ -7,6 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; import java.time.OffsetDateTime; +import java.util.List; /** * An immutable client-side representation of Revision. @@ -93,6 +94,13 @@ public interface Revision { */ Integer trafficWeight(); + /** + * Gets the labels property: List of labels assigned to this revision. + * + * @return the labels value. + */ + List labels(); + /** * Gets the provisioningError property: Optional Field - Platform Error Message. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScheduledEntry.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScheduledEntry.java new file mode 100644 index 0000000000000..96703ca581061 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScheduledEntry.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Maintenance schedule entry for a managed environment. + */ +@Fluent +public final class ScheduledEntry implements JsonSerializable { + /* + * Day of the week when a managed environment can be patched. + */ + private WeekDay weekDay; + + /* + * Start hour after which managed environment maintenance can start from 0 to 23 hour. + */ + private int startHourUtc; + + /* + * Length of maintenance window range from 8 to 24 hours. + */ + private Integer durationHours; + + /** + * Creates an instance of ScheduledEntry class. + */ + public ScheduledEntry() { + } + + /** + * Get the weekDay property: Day of the week when a managed environment can be patched. + * + * @return the weekDay value. + */ + public WeekDay weekDay() { + return this.weekDay; + } + + /** + * Set the weekDay property: Day of the week when a managed environment can be patched. + * + * @param weekDay the weekDay value to set. + * @return the ScheduledEntry object itself. + */ + public ScheduledEntry withWeekDay(WeekDay weekDay) { + this.weekDay = weekDay; + return this; + } + + /** + * Get the startHourUtc property: Start hour after which managed environment maintenance can start from 0 to 23 + * hour. + * + * @return the startHourUtc value. + */ + public int startHourUtc() { + return this.startHourUtc; + } + + /** + * Set the startHourUtc property: Start hour after which managed environment maintenance can start from 0 to 23 + * hour. + * + * @param startHourUtc the startHourUtc value to set. + * @return the ScheduledEntry object itself. + */ + public ScheduledEntry withStartHourUtc(int startHourUtc) { + this.startHourUtc = startHourUtc; + return this; + } + + /** + * Get the durationHours property: Length of maintenance window range from 8 to 24 hours. + * + * @return the durationHours value. + */ + public Integer durationHours() { + return this.durationHours; + } + + /** + * Set the durationHours property: Length of maintenance window range from 8 to 24 hours. + * + * @param durationHours the durationHours value to set. + * @return the ScheduledEntry object itself. + */ + public ScheduledEntry withDurationHours(Integer durationHours) { + this.durationHours = durationHours; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (weekDay() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property weekDay in model ScheduledEntry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduledEntry.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("weekDay", this.weekDay == null ? null : this.weekDay.toString()); + jsonWriter.writeIntField("startHourUtc", this.startHourUtc); + jsonWriter.writeNumberField("durationHours", this.durationHours); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledEntry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledEntry if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScheduledEntry. + */ + public static ScheduledEntry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledEntry deserializedScheduledEntry = new ScheduledEntry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("weekDay".equals(fieldName)) { + deserializedScheduledEntry.weekDay = WeekDay.fromString(reader.getString()); + } else if ("startHourUtc".equals(fieldName)) { + deserializedScheduledEntry.startHourUtc = reader.getInt(); + } else if ("durationHours".equals(fieldName)) { + deserializedScheduledEntry.durationHours = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledEntry; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java index 563164248f5c2..37e2bc51ef97c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java @@ -50,6 +50,14 @@ public interface SessionPool { */ Map tags(); + /** + * Gets the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @return the identity value. + */ + ManagedServiceIdentityAutoGenerated identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -135,6 +143,14 @@ public interface SessionPool { */ SessionPoolProvisioningState provisioningState(); + /** + * Gets the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @return the managedIdentitySettings value. + */ + List managedIdentitySettings(); + /** * Gets the region of the resource. * @@ -219,10 +235,11 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithEnvironmentId, DefinitionStages.WithContainerType, - DefinitionStages.WithPoolManagementType, DefinitionStages.WithScaleConfiguration, - DefinitionStages.WithSecrets, DefinitionStages.WithDynamicPoolConfiguration, - DefinitionStages.WithCustomContainerTemplate, DefinitionStages.WithSessionNetworkConfiguration { + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithEnvironmentId, + DefinitionStages.WithContainerType, DefinitionStages.WithPoolManagementType, + DefinitionStages.WithScaleConfiguration, DefinitionStages.WithSecrets, + DefinitionStages.WithDynamicPoolConfiguration, DefinitionStages.WithCustomContainerTemplate, + DefinitionStages.WithSessionNetworkConfiguration, DefinitionStages.WithManagedIdentitySettings { /** * Executes the create request. * @@ -252,6 +269,21 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the SessionPool definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed identities needed by a session pool to interact with other Azure + * services to not maintain any secrets or credentials in code.. + * + * @param identity Managed identities needed by a session pool to interact with other Azure services to not + * maintain any secrets or credentials in code. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentityAutoGenerated identity); + } + /** * The stage of the SessionPool definition allowing to specify environmentId. */ @@ -359,6 +391,21 @@ interface WithSessionNetworkConfiguration { */ WithCreate withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration); } + + /** + * The stage of the SessionPool definition allowing to specify managedIdentitySettings. + */ + interface WithManagedIdentitySettings { + /** + * Specifies the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned + * to the Session pool.. + * + * @param managedIdentitySettings Optional settings for a Managed Identity that is assigned to the Session + * pool. + * @return the next definition stage. + */ + WithCreate withManagedIdentitySettings(List managedIdentitySettings); + } } /** @@ -371,7 +418,7 @@ interface WithSessionNetworkConfiguration { /** * The template for SessionPool update. */ - interface Update extends UpdateStages.WithScaleConfiguration, UpdateStages.WithSecrets, + interface Update extends UpdateStages.WithIdentity, UpdateStages.WithScaleConfiguration, UpdateStages.WithSecrets, UpdateStages.WithDynamicPoolConfiguration, UpdateStages.WithCustomContainerTemplate, UpdateStages.WithSessionNetworkConfiguration { /** @@ -394,6 +441,21 @@ interface Update extends UpdateStages.WithScaleConfiguration, UpdateStages.WithS * The SessionPool update stages. */ interface UpdateStages { + /** + * The stage of the SessionPool update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed identities needed by a session pool to interact with other Azure + * services to not maintain any secrets or credentials in code.. + * + * @param identity Managed identities needed by a session pool to interact with other Azure services to not + * maintain any secrets or credentials in code. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityAutoGenerated identity); + } + /** * The stage of the SessionPool update allowing to specify scaleConfiguration. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java index de08b47b15868..2c2a93777eb9a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java @@ -18,6 +18,12 @@ */ @Fluent public final class SessionPoolUpdatableProperties implements JsonSerializable { + /* + * Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or + * credentials in code. + */ + private ManagedServiceIdentityAutoGenerated identity; + /* * Session pool resource specific updatable properties. */ @@ -29,6 +35,28 @@ public final class SessionPoolUpdatableProperties implements JsonSerializable"), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .withProperties(new ConnectedEnvironmentDaprComponentProperties().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind"))))) .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 e70ee6e10a3f5..e9a6a401ced3c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Delete.json */ /** @@ -19,6 +19,6 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + .delete("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 dad57a35024c6..e81d5309caed2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Get.json */ /** 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 6b9cc0f5ae4a8..b86fef4bb5c40 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_List.json */ /** 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 2cd3cc0fb7d94..211d6dad03357 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** 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 dbd6a8ef2db22..411fbed65276d 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 @@ -10,7 +10,7 @@ public final class ConnectedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Delete + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ConnectedEnvironments_Delete * .json */ /** 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 4a1513f9a4a78..f214e931077e2 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 @@ -10,7 +10,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Get. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ConnectedEnvironments_Get. * json */ /** 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 d8eb3c1f3aefb..abacaa514e5a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironments_ListByResourceGroup.json */ /** 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 3f75a3e3bbbb0..988915c9e35e2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironments_ListBySubscription.json */ /** 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 6d4af124e1a80..16010630265bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** 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 e1a810979bac0..b89fb391c52ca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_Delete.json */ /** @@ -20,6 +20,6 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironmentsStorages() - .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); + .delete("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 190191c171c58..4ef6bcb98105f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_Get.json */ /** 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 6e70076ff3017..5042ab169b9f7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ConnectedEnvironmentsStorages_List.json */ /** 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 6122dc7fdd37c..b77bf7649dbb0 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 @@ -10,7 +10,7 @@ public final class ConnectedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ConnectedEnvironments_Patch. * json */ /** 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 143d66b9a81c8..d34c0babcfde1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -6,10 +6,13 @@ import com.azure.resourcemanager.appcontainers.models.AppRegistration; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.BlobStorageTokenStore; import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.Facebook; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; +import com.azure.resourcemanager.appcontainers.models.Login; +import com.azure.resourcemanager.appcontainers.models.TokenStore; import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; /** @@ -18,7 +21,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_CreateOrUpdate. * json */ /** @@ -41,4 +44,62 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) .create(); } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * AuthConfigs_BlobStorageTokenStore_ClientId_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App AuthConfig with msi clientID blob storage token store. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppAuthConfigWithMsiClientIDBlobStorageTokenStore( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .define("current") + .withExistingContainerApp("rg1", "myapp") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withLogin(new Login().withTokenStore(new TokenStore().withAzureBlobStorage( + new BlobStorageTokenStore().withBlobContainerUri("https://test.blob.core.windows.net/container1") + .withClientId("00000000-0000-0000-0000-000000000000")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * AuthConfigs_BlobStorageTokenStore_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App AuthConfig with msi managedIdentityResourceId blob storage token + * store. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppAuthConfigWithMsiManagedIdentityResourceIdBlobStorageTokenStore( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .define("current") + .withExistingContainerApp("rg1", "myapp") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withLogin(new Login().withTokenStore(new TokenStore().withAzureBlobStorage(new BlobStorageTokenStore() + .withBlobContainerUri("https://test.blob.core.windows.net/container1") + .withManagedIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) + .create(); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java index a49b07fbfbffe..9c66ab6157079 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 @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index 9417356a6833d..d7dea4cd415bf 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 @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 143b77f848280..359c688ec930e 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 @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_ListByContainer. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/AuthConfigs_ListByContainer. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java index 6686bd6a506e4..9dd6c03ac06c7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsBuildsByContainerAppListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsBuilds_ListByContainerApp.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java index d794bce2bd4a9..73a963b1f0d3b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsBuildsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsBuilds_Delete. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java index 02938b7801e76..99cb192827c53 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsBuildsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsBuilds_Get.json */ /** * Sample code: ContainerAppsBuilds_Get_0. 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 5ba9d5f68cb5d..f54e451461671 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 @@ -67,7 +67,7 @@ */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_SourceToCloudApp_CreateOrUpdate.json */ /** @@ -136,6 +136,7 @@ public final class ContainerAppsCreateOrUpdateSamples { .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100) .withService(new Service().withType("redis"))) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") @@ -187,7 +188,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** @@ -261,7 +262,8 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) - .withMaxInactiveRevisions(10)) + .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100)) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") .withName("testinitcontainerApp0") @@ -291,7 +293,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_CreateOrUpdate * .json */ /** @@ -372,6 +374,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withLevel(Level.DEBUG)))))) .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100) .withService(new Service().withType("redis")) .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") @@ -382,7 +385,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withName("testinitcontainerApp0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi").withGpu(1.0D)))) .withContainers(Arrays.asList(new Container() .withImage("repo/testcontainerApp0:v1") .withName("testcontainerApp0") @@ -437,7 +440,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_TcpApp_CreateOrUpdate.json */ /** @@ -476,7 +479,7 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_Kind_CreateOrUpdate.json */ /** @@ -506,7 +509,7 @@ public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** 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 5f50dd46a3234..24ea7bb8ff40f 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 @@ -10,7 +10,7 @@ public final class ContainerAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java index fc000bd6d75a9..bfff8e4c238cf 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 @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsDiagnostics_Get + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsDiagnostics_Get * .json */ /** 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 ffd1f44ea7c28..6e3631f9d96cd 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 @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java index 342aa2656f01e..9805e8390cd1f 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 @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java index 21aada039a252..94c0e64069a23 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsDiagnostics_List.json */ /** 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 aa49ec68ee764..ec27f8489b291 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 @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java index d94b7d7833196..488a847c7f257 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 @@ -10,7 +10,7 @@ public final class ContainerAppsGetAuthTokenSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_GetAuthToken. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_GetAuthToken. * json */ /** 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 6fb147906e9f8..683bc67cb04d7 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 @@ -10,7 +10,7 @@ public final class ContainerAppsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsLabelHistoryGetLabelHistorySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsLabelHistoryGetLabelHistorySamples.java new file mode 100644 index 0000000000000..1790c82e128a9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsLabelHistoryGetLabelHistorySamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsLabelHistory GetLabelHistory. + */ +public final class ContainerAppsLabelHistoryGetLabelHistorySamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LabelHistory_Get.json + */ + /** + * Sample code: Get Container App's single label history. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSSingleLabelHistory(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsLabelHistories() + .getLabelHistoryWithResponse("rg", "testContainerApp", "dev", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsLabelHistoryListLabelHistorySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsLabelHistoryListLabelHistorySamples.java new file mode 100644 index 0000000000000..48531c01d49a9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsLabelHistoryListLabelHistorySamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsLabelHistory ListLabelHistory. + */ +public final class ContainerAppsLabelHistoryListLabelHistorySamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LabelHistory_List.json + */ + /** + * Sample code: List Container App's all label history. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSAllLabelHistory(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsLabelHistories() + .listLabelHistory("rg", "testContainerApp", null, 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 7a69c21389d24..b54434a5eb236 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ListByResourceGroup.json */ /** 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 b47fb8cf7ebe0..17c618032ded1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ListCustomHostNameAnalysis.json */ /** 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 30c03a3b94d8e..10deacb4b5f2b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_ListBySubscription.json */ /** 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 7808b22c206f8..e60f91ed36a3e 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 @@ -10,7 +10,7 @@ public final class ContainerAppsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_ListSecrets. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java index 37a65cb09de86..9f34aae344eeb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsPatchesApplySamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Apply. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsPatches_Apply. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java index 23aaaa9b06639..7592b0759c792 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsPatchesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsPatches_Delete. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java index f0bf661305554..34661c1565d39 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsPatchesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Get. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerAppsPatches_Get. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java index 89b38226f4315..6863fcfc897b2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsPatchesListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsPatches_ListByContainerApp.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java index 2ea4c1b7b00b5..dad2d13b11922 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java @@ -11,7 +11,7 @@ */ public final class ContainerAppsPatchesSkipConfigureSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerAppsPatches_Skip_Configure.json */ /** 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 be0a59dc733c7..3e9c6ef2d4182 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index 32236a3fd1449..ceda424e9bab7 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index fa1b1328e52ea..59a3c0e436261 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Activate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index 18268907227c5..50a5c8ba8f8b8 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Deactivate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index 66a0df2e7322c..4bdd0a4bf99c4 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 86254c2f2c3b9..a32c6a7d9bf22 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index 4ccaba04c1cd3..1b05313be9cfd 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsRestartRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Restart.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java index af9314a905208..2dfd5a49a400e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java @@ -8,6 +8,10 @@ import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityAutoGenerated; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionContainer; @@ -15,6 +19,7 @@ import com.azure.resourcemanager.appcontainers.models.SessionIngress; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionRegistryCredentials; import java.util.Arrays; /** @@ -23,7 +28,7 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_CreateOrUpdate. * json */ /** @@ -37,6 +42,8 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .define("testsessionpool") .withRegion("East US") .withExistingResourceGroup("rg") + .withIdentity( + new ManagedServiceIdentityAutoGenerated().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withContainerType(ContainerType.CUSTOM_CONTAINER) @@ -46,6 +53,9 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .withDynamicPoolConfiguration( new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) .withCustomContainerTemplate(new CustomContainerTemplate() + .withRegistryCredentials(new SessionRegistryCredentials().withServer("test.azurecr.io") + .withIdentity( + "/subscriptions/7a497526-bb8d-4816-9795-db1418a1f977/resourcegroups/test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testSP")) .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") .withName("testinitcontainer") .withCommand(Arrays.asList("/bin/sh")) @@ -54,6 +64,8 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .withIngress(new SessionIngress().withTargetPort(80))) .withSessionNetworkConfiguration( new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .withManagedIdentitySettings(Arrays.asList( + new ManagedIdentitySetting().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.MAIN))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java index 7b9bd5de12ea4..50fcfaf1627fd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSessionPoolsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_Delete.json */ /** * Sample code: Delete Session Pool. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java index c136e056fa441..640d71ae3278d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_Get.json */ /** * Sample code: Get Session Pool. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java index 1677fc7d7798d..8974458a3b89b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsSessionPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SessionPools_ListByResourceGroup.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java index 37ddb684416e8..bd9f9a37c5597 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsSessionPoolsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SessionPools_ListBySubscription.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java index 0fabb3c3e25b2..12e0e992d9a84 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java @@ -22,7 +22,7 @@ public final class ContainerAppsSessionPoolsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SessionPools_Patch.json */ /** * Sample code: Update Session Pool. 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 6fb517b9f8e3b..e93f4eed62741 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SourceControls_CreateOrUpdate.json */ /** 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 9f430abc6070d..be470f03f580d 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 @@ -10,7 +10,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index c64fd5555ada0..7f92c739888bd 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 @@ -10,7 +10,7 @@ public final class ContainerAppsSourceControlsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index d83a9a11534f4..5fd2f4c5212b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * SourceControls_ListByContainer.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java index 86025c2535209..b33ff931904c3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java index 48f53c7c49060..5262bbcf048f9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsStopSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Stop.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index 73cbb75c73b6e..e3df3b5372ca1 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 @@ -47,7 +47,7 @@ public final class ContainerAppsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -105,6 +105,7 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10) + .withRevisionTransitionThreshold(100) .withService(new Service().withType("redis"))) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java index d4b9a794ffc7c..e1b4202fb2ccf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** @@ -43,7 +43,7 @@ public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicy } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** @@ -82,7 +82,7 @@ public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java index c3c9cc5c58684..52e64634f65bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicies_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java index f45ee6c3a9eb3..2267e38c4131b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicies_Get.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java index 550d0ccdd3154..0259f6b313fa5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponentResiliencyPolicies_List.json */ /** 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 362037bead0a4..1caa5d78920f7 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,7 +4,6 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; @@ -16,7 +15,7 @@ */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponents_CreateOrUpdate_Secrets.json */ /** @@ -27,27 +26,27 @@ public final class DaprComponentsCreateOrUpdateSamples { public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents() - .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), - com.azure.core.util.Context.NONE); + .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("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** @@ -58,22 +57,22 @@ public static void createOrUpdateDaprComponentWithSecrets( public static void createOrUpdateDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents() - .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("fakeTokenPlaceholder") - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), - com.azure.core.util.Context.NONE); + .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("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index 6a0bd40611f55..c9d98b872639d 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 @@ -10,7 +10,7 @@ public final class DaprComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index e1931e12e6834..e1d6a35ee6d10 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprComponents_Get_SecretStoreComponent.json */ /** @@ -25,7 +25,7 @@ public static void getDaprComponentWithSecretStoreComponent( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Get_Secrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_Get_Secrets. * json */ /** 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 ce2805bc3cd4b..e692c628220cc 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 @@ -10,7 +10,7 @@ public final class DaprComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index 747f433036c56..7ca9fa4541463 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 @@ -10,7 +10,7 @@ public final class DaprComponentsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprComponents_ListSecrets. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java index e9752162c8944..00002d0128171 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** @@ -41,7 +41,7 @@ public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json */ /** @@ -61,7 +61,7 @@ public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java index b02f4a6eeb4a7..845c71d9d3756 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class DaprSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprSubscriptions_Delete. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java index f1a79e7b214e6..106b4d4e56080 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_Get_DefaultRoute.json */ /** @@ -24,7 +24,7 @@ public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** @@ -39,7 +39,7 @@ public static void getDaprSubscriptionWithDefaultRouteOnly( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java index faa20c8c5279c..2129dfaf7ab29 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java @@ -10,7 +10,7 @@ public final class DaprSubscriptionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DaprSubscriptions_List.json */ /** * Sample code: List Dapr subscriptions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java index 7095a1aa2bc56..c1c348a14b647 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_CreateOrUpdate.json */ /** @@ -34,7 +34,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java index 72fecd9809257..2c3a28d135cd0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class DotNetComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_Delete.json */ /** * Sample code: Delete .NET Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java index 3d3fe0a9f2e4a..7ccc8a7e718e6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_Get_ServiceBind.json */ /** @@ -25,7 +25,7 @@ public final class DotNetComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_Get.json */ /** * Sample code: Get .NET Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java index 9e2ec3d64fb1a..bd80c9a7b4a1c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java @@ -10,7 +10,7 @@ public final class DotNetComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_List.json */ /** * Sample code: List .NET Components. @@ -22,7 +22,7 @@ public static void listNETComponents(com.azure.resourcemanager.appcontainers.Con } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_List_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java index 7a8a7b9861903..44367282ae6d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * DotNetComponents_Patch_ServiceBind.json */ /** @@ -40,7 +40,7 @@ public final class DotNetComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/DotNetComponents_Patch.json */ /** * Sample code: Patch .NET Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java index d2d152bd84293..283bceb5fdc18 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java @@ -10,7 +10,7 @@ public final class FunctionsExtensionInvokeFunctionsHostSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/FunctionsExtension_Post.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/FunctionsExtension_Post.json */ /** * Sample code: Invoke Functions host using Functions Extension API. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..dba70c051d2a9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigCreateOrUpdateSamples.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.HttpRoute; +import com.azure.resourcemanager.appcontainers.models.HttpRouteAction; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigProperties; +import com.azure.resourcemanager.appcontainers.models.HttpRouteMatch; +import com.azure.resourcemanager.appcontainers.models.HttpRouteRule; +import com.azure.resourcemanager.appcontainers.models.HttpRouteTarget; +import java.util.Arrays; + +/** + * Samples for HttpRouteConfig CreateOrUpdate. + */ +public final class HttpRouteConfigCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Http Route. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateHttpRoute(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .define("httproutefriendlyname") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays + .asList(new HttpRouteTarget().withContainerApp("capp-1").withRevision("rev-1").withWeight(100))) + .withRoutes(Arrays + .asList(new HttpRoute().withMatch(new HttpRouteMatch().withPath("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json + */ + /** + * Sample code: Create or Update Http Route Path Separated Prefix Rule. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateHttpRoutePathSeparatedPrefixRule( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .define("httproutefriendlyname") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.DISABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays.asList(new HttpRouteTarget().withContainerApp("capp-1").withLabel("label-1"))) + .withRoutes(Arrays.asList(new HttpRoute() + .withMatch(new HttpRouteMatch().withPathSeparatedPrefix("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_CreateOrUpdatePrefix.json + */ + /** + * Sample code: Create or Update Http Route Prefix Rule. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateHttpRoutePrefixRule(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .define("httproutefriendlyname") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.DISABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays.asList(new HttpRouteTarget().withContainerApp("capp-1").withLabel("label-1"))) + .withRoutes(Arrays.asList( + new HttpRoute().withMatch(new HttpRouteMatch().withPrefix("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigDeleteSamples.java new file mode 100644 index 0000000000000..813a2dea6b908 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for HttpRouteConfig Delete. + */ +public final class HttpRouteConfigDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .deleteWithResponse("examplerg", "testcontainerenv", "httproutefriendlyname", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigGetSamples.java new file mode 100644 index 0000000000000..68b3349eeb938 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for HttpRouteConfig Get. + */ +public final class HttpRouteConfigGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Get.json + */ + /** + * Sample code: Get HttpRoute. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getHttpRoute(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs() + .getWithResponse("examplerg", "testcontainerenv", "httproutefriendlyname", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigListSamples.java new file mode 100644 index 0000000000000..9341f9b74f6de --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for HttpRouteConfig List. + */ +public final class HttpRouteConfigListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * HttpRouteConfig_ListByManagedEnvironment.json + */ + /** + * Sample code: List Managed Http Routes by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listManagedHttpRoutesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.httpRouteConfigs().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/HttpRouteConfigUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigUpdateSamples.java new file mode 100644 index 0000000000000..96be423455dab --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/HttpRouteConfigUpdateSamples.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.generated; + +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.HttpRoute; +import com.azure.resourcemanager.appcontainers.models.HttpRouteAction; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfig; +import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigProperties; +import com.azure.resourcemanager.appcontainers.models.HttpRouteMatch; +import com.azure.resourcemanager.appcontainers.models.HttpRouteRule; +import com.azure.resourcemanager.appcontainers.models.HttpRouteTarget; +import java.util.Arrays; + +/** + * Samples for HttpRouteConfig Update. + */ +public final class HttpRouteConfigUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Patch.json + */ + /** + * Sample code: Patch Managed Http Route. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchManagedHttpRoute(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + HttpRouteConfig resource = manager.httpRouteConfigs() + .getWithResponse("examplerg", "testcontainerenv", "httproutefriendlyname", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new HttpRouteConfigProperties().withCustomDomains(Arrays.asList(new CustomDomain() + .withName("example.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"))) + .withRules(Arrays.asList(new HttpRouteRule() + .withTargets(Arrays + .asList(new HttpRouteTarget().withContainerApp("capp-1").withRevision("rev-1").withWeight(100))) + .withRoutes(Arrays + .asList(new HttpRoute().withMatch(new HttpRouteMatch().withPath("/v1").withCaseSensitive(true)) + .withAction(new HttpRouteAction().withPrefixRewrite("/v1/api")))) + .withDescription("random-description")))) + .apply(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java index db9afd651540f..fb564485f9161 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -41,7 +41,7 @@ public static void createOrUpdateJavaComponentWithServiceBinds( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java index 9f58ca0275774..ad469943b94c6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java index 9b84692a24aaa..8d84fa0ff8a7d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -23,7 +23,7 @@ public static void getJavaComponent(com.azure.resourcemanager.appcontainers.Cont } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_Get_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java index c44efbdb793f4..8bbd71e64e3a0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -22,7 +22,7 @@ public static void listJavaComponents(com.azure.resourcemanager.appcontainers.Co } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_List_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java index 6150658c966de..ef8afe295fced 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java @@ -17,7 +17,7 @@ public final class JavaComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -39,7 +39,7 @@ public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.Co } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * JavaComponents_Patch_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java index 973b63251022a..5e5382b4b5be2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java @@ -38,7 +38,7 @@ */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Job_CreateorUpdate_ConnectedEnvironment.json */ /** @@ -84,7 +84,7 @@ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Job_CreateorUpdate_EventTrigger.json */ /** @@ -131,7 +131,7 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_CreateorUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -165,7 +165,7 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi").withGpu(1.0D)))) .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") .withName("testcontainerAppsJob0") .withVolumeMounts(Arrays.asList( diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java index b76e448833723..264b41c4aad60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java @@ -10,7 +10,7 @@ public final class JobsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java index 94a4e76b70442..fd48f036e4e85 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java @@ -10,7 +10,7 @@ public final class JobsExecutionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Executions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java index a309e5dde176d..ba7bbc6ba2b63 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class JobsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java index cca0b1cf282af..67efc674b5827 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java @@ -10,7 +10,7 @@ public final class JobsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_GetDetector.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java index 117f74e5aa9c9..fc5177334f8fd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class JobsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListByResourceGroup. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_ListByResourceGroup. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java index c68aecf2608c4..a3f0c714a2951 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java @@ -10,7 +10,7 @@ public final class JobsListDetectorsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListDetectors.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java index 67d518d641aca..6583f8cfbc40e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java @@ -10,7 +10,7 @@ public final class JobsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListBySubscription.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java index f19d121d71fae..86ccc1ae2e255 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java @@ -10,7 +10,7 @@ public final class JobsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListSecrets.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java index db1a83552fba2..973115b4180e8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java @@ -10,7 +10,7 @@ public final class JobsProxyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ProxyGet.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java index a0d1a9a3d2b74..4a855ea10ea8e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java @@ -10,7 +10,7 @@ public final class JobsResumeSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_Resume.json */ /** * Sample code: Resume Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java index 93c5a0146c92b..94e688bb508ad 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java @@ -15,7 +15,7 @@ public final class JobsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java index 415fe63c30514..20e34bcc4cd89 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java @@ -10,7 +10,7 @@ public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Execution.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java index 276f8a8ab0b4c..29a2bad55aec7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java @@ -10,7 +10,7 @@ public final class JobsStopMultipleExecutionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Multiple.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java index ade74a6c222b1..fac6fb8a7fa93 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java @@ -10,7 +10,7 @@ public final class JobsSuspendSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Jobs_Suspend.json */ /** * Sample code: Suspend Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java index ee301ddb73d9d..6818dbaabcefb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java @@ -25,7 +25,7 @@ public final class JobsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java index 7059bea17e9dc..16455ac865e2a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class LogicAppsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Create.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_Create.json */ /** * Sample code: Create logic app extension. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java index 8a6c4e072c793..7f2448a7f1735 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java @@ -10,7 +10,7 @@ public final class LogicAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_Delete.json */ /** * Sample code: Create logic app extension. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java index db0a080601c71..24e1e0e7b1d2d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java @@ -15,7 +15,7 @@ */ public final class LogicAppsDeployWorkflowArtifactsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * LogicApps_PostDeployWorkflowArtifacts.json */ /** @@ -39,7 +39,7 @@ public static void deploysWorkflowArtifacts(com.azure.resourcemanager.appcontain } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * LogicApps_DeleteDeployWorkflowArtifacts.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java index a15c4877b3b8d..05e3022a7a51d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java @@ -10,7 +10,7 @@ public final class LogicAppsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_Get.json */ /** * Sample code: Get logic app extension by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java index b00e986a48707..fff192f56997c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java @@ -10,7 +10,7 @@ public final class LogicAppsGetWorkflowSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_GetWorkflow.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_GetWorkflow.json */ /** * Sample code: GET a workflow. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java index 21d6cbf7adbc0..b425f793daf8d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java @@ -12,7 +12,7 @@ public final class LogicAppsInvokeSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListCallbackURL. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_ListCallbackURL. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java index 966165fb33cc0..22b8f5f05c1a3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java @@ -10,7 +10,7 @@ public final class LogicAppsListWorkflowsConnectionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListConnections. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_ListConnections. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java index e89f741ad8f15..77e7be0f7d935 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java @@ -10,7 +10,7 @@ public final class LogicAppsListWorkflowsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListWorkflows.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/LogicApps_ListWorkflows.json */ /** * Sample code: List the workflows. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..7eeb9e930ba35 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsCreateOrUpdateSamples.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.ScheduledEntry; +import com.azure.resourcemanager.appcontainers.models.WeekDay; +import java.util.Arrays; + +/** + * Samples for MaintenanceConfigurations CreateOrUpdate. + */ +public final class MaintenanceConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsCreateOrUpdate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsCreateOrUpdate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations() + .define("default") + .withExistingManagedEnvironment("rg1", "managedEnv") + .withScheduledEntries(Arrays + .asList(new ScheduledEntry().withWeekDay(WeekDay.SUNDAY).withStartHourUtc(12).withDurationHours(9))) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsDeleteSamples.java new file mode 100644 index 0000000000000..2c9a3d7523899 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for MaintenanceConfigurations Delete. + */ +public final class MaintenanceConfigurationsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_Delete.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsDelete. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsDelete( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations() + .deleteWithResponse("rg1", "managedEnv", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsGetSamples.java new file mode 100644 index 0000000000000..2726e28d95385 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for MaintenanceConfigurations Get. + */ +public final class MaintenanceConfigurationsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_Get.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsGet. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsGet( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations() + .getWithResponse("rg1", "managedEnv", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsListSamples.java new file mode 100644 index 0000000000000..9a8e4b9618461 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/MaintenanceConfigurationsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for MaintenanceConfigurations List. + */ +public final class MaintenanceConfigurationsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ + * ManagedEnvironment_MaintenanceConfigurations_List.json + */ + /** + * Sample code: ManagedEnvironmentMaintenanceConfigurationsList. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void managedEnvironmentMaintenanceConfigurationsList( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.maintenanceConfigurations().list("rg1", "managedEnv", 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 index 48aa7b073730b..b78aacf818f8a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedCertificate_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java index 41fbb11fe73a9..69377d453d124 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java @@ -10,7 +10,7 @@ public final class ManagedCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedCertificate_Delete. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java index f7f72aed6b2d8..66e7704402f5d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java @@ -10,7 +10,7 @@ public final class ManagedCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java index 31bcebb6e29c2..43d083cd7c623 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedCertificates_ListByManagedEnvironment.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java index 895c3e3e8511f..5e0a1f87b142d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java @@ -14,7 +14,7 @@ public final class ManagedCertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificates_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedCertificates_Patch. * json */ /** 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 a0c94afac2b8f..6f6d88695ab74 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentDiagnostics_Get.json */ /** 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 c9a294291bc9c..29f2059389668 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentDiagnostics_List.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java index 87843e4e62a1f..270478980ce4d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java index b5d38a2e8e0a3..7ec714f14c618 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java index 721ed9d779f36..94689c5aa0cdf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_Get.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java index a3aae49c0f53e..0773640b11f58 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateEndpointConnections_List.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java index 3ff930306954c..2d79399f45588 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentPrivateLinkResources_List.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java index 85e1ddcd9fb80..a55b74700d10c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentUsages_List.json */ /** 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 0313fc040349e..e09b5da388fb4 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 @@ -34,7 +34,7 @@ */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** @@ -55,6 +55,7 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( .withAppLogsConfiguration(new AppLogsConfiguration().withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") .withCertificateValue("Y2VydA==".getBytes()) .withCertificatePassword("fakeTokenPlaceholder")) @@ -78,7 +79,7 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_CreateOrUpdate.json */ /** @@ -123,6 +124,7 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .withMetricsConfiguration( new MetricsConfiguration().withIncludeKeda(true).withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") .withCertificateValue("Y2VydA==".getBytes()) .withCertificatePassword("fakeTokenPlaceholder")) 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 29090f9ae4205..618e094628f4a 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 @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Delete. * json */ /** 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 8e2a2d466ebcc..3a0dbab014f24 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 @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java index da417c5c2e480..b4b6ea4833406 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_GetAuthToken.json */ /** 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 58263b19bcf3f..23dc0eadb10a2 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 @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index bd2c8466caa94..8e9c534633004 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_ListByResourceGroup.json */ /** 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 24c471f995548..5a21c4e9e863d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_ListBySubscription.json */ /** 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 dc3b8052e876b..b8e42d5c0f187 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironments_ListWorkloadProfileStates.json */ /** 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 57c64dc2e168a..a5156f4912f60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** @@ -35,7 +35,7 @@ public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** 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 96aa482aec40c..9651bec453613 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_Delete.json */ /** 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 514d0805333ee..6e389dea9bc81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_Get.json */ /** @@ -24,7 +24,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** 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 bbe5f49947ded..b69460c492eda 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ManagedEnvironmentsStorages_List.json */ /** 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 562aefc9b79ad..45e38d8bae150 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 @@ -14,7 +14,7 @@ public final class ManagedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ManagedEnvironments_Patch. * json */ /** 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 7d2e2239211fb..082cff12fab91 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Certificates_CheckNameAvailability.json */ /** @@ -29,7 +29,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * ContainerApps_CheckNameAvailability.json */ /** 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 8ad710ecba765..327ad14c509a6 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 @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Operations_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Operations_List.json */ /** * Sample code: List all operations. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java index 5f2c8a16dacc0..7c43ba4e318aa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/ * Subscriptions_GetCustomDomainVerificationId.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java index 179edce84f52c..84b70c9ba83d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java @@ -10,7 +10,7 @@ public final class ResourceProviderJobExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Execution_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java index 69264fa45fa26..09fe00e4f6786 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java @@ -10,7 +10,7 @@ public final class UsagesListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Usages_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 6667610d952ae..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedAudiencesValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedAudiencesValidation model = BinaryData - .fromString("{\"allowedAudiences\":[\"eojnxqbzvddn\",\"wndeicbtwnp\",\"aoqvuh\",\"hcffcyddglmjthjq\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("eojnxqbzvddn", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model = new AllowedAudiencesValidation() - .withAllowedAudiences(Arrays.asList("eojnxqbzvddn", "wndeicbtwnp", "aoqvuh", "hcffcyddglmjthjq")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("eojnxqbzvddn", 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 9c45fcbdebaa7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.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.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedPrincipalsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedPrincipals model = BinaryData.fromString("{\"groups\":[\"a\",\"tjaodxobnb\"],\"identities\":[\"qp\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("a", model.groups().get(0)); - Assertions.assertEquals("qp", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model - = new AllowedPrincipals().withGroups(Arrays.asList("a", "tjaodxobnb")).withIdentities(Arrays.asList("qp")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("a", model.groups().get(0)); - Assertions.assertEquals("qp", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java deleted file mode 100644 index 7b0e21093f5cd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AppInsightsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AppInsightsConfiguration model = BinaryData.fromString("{\"connectionString\":\"mvagbwidqlvhuko\"}") - .toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("mvagbwidqlvhuko", model.connectionString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AppInsightsConfiguration model = new AppInsightsConfiguration().withConnectionString("mvagbwidqlvhuko"); - model = BinaryData.fromObject(model).toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("mvagbwidqlvhuko", model.connectionString()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java deleted file mode 100644 index 6951774890b7c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AppResilienciesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.appResiliencies() - .deleteWithResponse("odlikcdrdaasax", "obsmf", "wiyjvzuko", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 935ab80a5418b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; - -public final class AuthPlatformTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthPlatform model - = BinaryData.fromString("{\"enabled\":false,\"runtimeVersion\":\"ol\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("ol", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(false).withRuntimeVersion("ol"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("ol", 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 29084b04ae9c2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableOperationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableOperations model = BinaryData.fromString( - "{\"value\":[{\"name\":\"wex\",\"isDataAction\":true,\"display\":{\"provider\":\"azipbhpwvqsg\",\"resource\":\"yuuzivens\",\"operation\":\"meyyvpkpatlb\",\"description\":\"pzgsk\"},\"origin\":\"fhfv\"},{\"name\":\"mknbnxwcdommpv\",\"isDataAction\":false,\"display\":{\"provider\":\"fgbrtt\",\"resource\":\"aclkiexhajlfnt\",\"operation\":\"qfyuttd\",\"description\":\"gbpvnwswmtxkyct\"},\"origin\":\"gzwx\"}],\"nextLink\":\"mecvogygzyvneeza\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("wex", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("azipbhpwvqsg", model.value().get(0).display().provider()); - Assertions.assertEquals("yuuzivens", model.value().get(0).display().resource()); - Assertions.assertEquals("meyyvpkpatlb", model.value().get(0).display().operation()); - Assertions.assertEquals("pzgsk", model.value().get(0).display().description()); - Assertions.assertEquals("fhfv", model.value().get(0).origin()); - Assertions.assertEquals("mecvogygzyvneeza", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = new AvailableOperations().withValue(Arrays.asList( - new OperationDetailInner().withName("wex") - .withIsDataAction(true) - .withDisplay(new OperationDisplay().withProvider("azipbhpwvqsg") - .withResource("yuuzivens") - .withOperation("meyyvpkpatlb") - .withDescription("pzgsk")) - .withOrigin("fhfv"), - new OperationDetailInner().withName("mknbnxwcdommpv") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("fgbrtt") - .withResource("aclkiexhajlfnt") - .withOperation("qfyuttd") - .withDescription("gbpvnwswmtxkyct")) - .withOrigin("gzwx"))) - .withNextLink("mecvogygzyvneeza"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("wex", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("azipbhpwvqsg", model.value().get(0).display().provider()); - Assertions.assertEquals("yuuzivens", model.value().get(0).display().resource()); - Assertions.assertEquals("meyyvpkpatlb", model.value().get(0).display().operation()); - Assertions.assertEquals("pzgsk", model.value().get(0).display().description()); - Assertions.assertEquals("fhfv", model.value().get(0).origin()); - Assertions.assertEquals("mecvogygzyvneeza", 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 61dbb29cd3e30..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.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.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileInner model = BinaryData.fromString( - "{\"location\":\"fhyhltrpmopjmcma\",\"properties\":{\"category\":\"kthfui\",\"applicability\":\"Custom\",\"cores\":1411125802,\"memoryGiB\":2105680522,\"gpus\":1099680690,\"displayName\":\"xodpuozmyzydagfu\"},\"id\":\"bezy\",\"name\":\"uokktwhrdxwz\",\"type\":\"wqsmbsur\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.location()); - Assertions.assertEquals("kthfui", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1411125802, model.properties().cores()); - Assertions.assertEquals(2105680522, model.properties().memoryGiB()); - Assertions.assertEquals(1099680690, model.properties().gpus()); - Assertions.assertEquals("xodpuozmyzydagfu", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = new AvailableWorkloadProfileInner().withLocation("fhyhltrpmopjmcma") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("kthfui") - .withApplicability(Applicability.CUSTOM) - .withCores(1411125802) - .withMemoryGiB(2105680522) - .withGpus(1099680690) - .withDisplayName("xodpuozmyzydagfu")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.location()); - Assertions.assertEquals("kthfui", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1411125802, model.properties().cores()); - Assertions.assertEquals(2105680522, model.properties().memoryGiB()); - Assertions.assertEquals(1099680690, model.properties().gpus()); - Assertions.assertEquals("xodpuozmyzydagfu", 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 cc339dabfc4e2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileProperties model = BinaryData.fromString( - "{\"category\":\"imoryocfsfksym\",\"applicability\":\"LocationDefault\",\"cores\":666664165,\"memoryGiB\":30564685,\"gpus\":741108852,\"displayName\":\"hqyudxorrqnbpoc\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("imoryocfsfksym", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(666664165, model.cores()); - Assertions.assertEquals(30564685, model.memoryGiB()); - Assertions.assertEquals(741108852, model.gpus()); - Assertions.assertEquals("hqyudxorrqnbpoc", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model - = new AvailableWorkloadProfileProperties().withCategory("imoryocfsfksym") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(666664165) - .withMemoryGiB(30564685) - .withGpus(741108852) - .withDisplayName("hqyudxorrqnbpoc"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("imoryocfsfksym", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(666664165, model.cores()); - Assertions.assertEquals(30564685, model.memoryGiB()); - Assertions.assertEquals(741108852, model.gpus()); - Assertions.assertEquals("hqyudxorrqnbpoc", 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 c0218213201ab..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfilesCollection model = BinaryData.fromString( - "{\"value\":[{\"location\":\"wdslfhotwmcy\",\"properties\":{\"category\":\"lbjnpgacftadehx\",\"applicability\":\"Custom\",\"cores\":1099330569,\"memoryGiB\":737203180,\"gpus\":1772029927,\"displayName\":\"suesnzw\"},\"id\":\"jbavorxzdm\",\"name\":\"hctbqvudwxdn\",\"type\":\"nvowgujju\"},{\"location\":\"dkcglhsl\",\"properties\":{\"category\":\"dyggdtjixhbku\",\"applicability\":\"Custom\",\"cores\":194127225,\"memoryGiB\":363488888,\"gpus\":1047075786,\"displayName\":\"n\"},\"id\":\"fyexfwhy\",\"name\":\"cibvyvdcsitynn\",\"type\":\"amdecte\"},{\"location\":\"iqscjeypv\",\"properties\":{\"category\":\"rkgqhcjrefo\",\"applicability\":\"Custom\",\"cores\":668805249,\"memoryGiB\":1422729812,\"gpus\":1834153709,\"displayName\":\"vxyqjpkcattpngjc\"},\"id\":\"czsqpjhvm\",\"name\":\"ajvnysounqe\",\"type\":\"a\"}],\"nextLink\":\"ae\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("wdslfhotwmcy", model.value().get(0).location()); - Assertions.assertEquals("lbjnpgacftadehx", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1099330569, model.value().get(0).properties().cores()); - Assertions.assertEquals(737203180, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(1772029927, model.value().get(0).properties().gpus()); - Assertions.assertEquals("suesnzw", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfilesCollection model = new AvailableWorkloadProfilesCollection().withValue(Arrays.asList( - new AvailableWorkloadProfileInner().withLocation("wdslfhotwmcy") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("lbjnpgacftadehx") - .withApplicability(Applicability.CUSTOM) - .withCores(1099330569) - .withMemoryGiB(737203180) - .withGpus(1772029927) - .withDisplayName("suesnzw")), - new AvailableWorkloadProfileInner().withLocation("dkcglhsl") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("dyggdtjixhbku") - .withApplicability(Applicability.CUSTOM) - .withCores(194127225) - .withMemoryGiB(363488888) - .withGpus(1047075786) - .withDisplayName("n")), - new AvailableWorkloadProfileInner().withLocation("iqscjeypv") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("rkgqhcjrefo") - .withApplicability(Applicability.CUSTOM) - .withCores(668805249) - .withMemoryGiB(1422729812) - .withGpus(1834153709) - .withDisplayName("vxyqjpkcattpngjc")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("wdslfhotwmcy", model.value().get(0).location()); - Assertions.assertEquals("lbjnpgacftadehx", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1099330569, model.value().get(0).properties().cores()); - Assertions.assertEquals(737203180, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(1772029927, model.value().get(0).properties().gpus()); - Assertions.assertEquals("suesnzw", 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 f689385105e78..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - String responseStr - = "{\"value\":[{\"location\":\"lbvgwzsf\",\"properties\":{\"category\":\"dousnk\",\"applicability\":\"Custom\",\"cores\":1190539545,\"memoryGiB\":1496708072,\"gpus\":2093151817,\"displayName\":\"gfkbebauzlqbtxx\"},\"id\":\"f\",\"name\":\"njzudr\",\"type\":\"pzkg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("btahdeanii", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lbvgwzsf", response.iterator().next().location()); - Assertions.assertEquals("dousnk", response.iterator().next().properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, response.iterator().next().properties().applicability()); - Assertions.assertEquals(1190539545, response.iterator().next().properties().cores()); - Assertions.assertEquals(1496708072, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals(2093151817, response.iterator().next().properties().gpus()); - Assertions.assertEquals("gfkbebauzlqbtxx", 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 70f9ec5606ff9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.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.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureActiveDirectoryLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureActiveDirectoryLogin model = BinaryData - .fromString("{\"loginParameters\":[\"dzuhtymwi\",\"dkfthwxmnt\",\"i\"],\"disableWWWAuthenticate\":true}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("dzuhtymwi", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureActiveDirectoryLogin model - = new AzureActiveDirectoryLogin().withLoginParameters(Arrays.asList("dzuhtymwi", "dkfthwxmnt", "i")) - .withDisableWwwAuthenticate(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("dzuhtymwi", 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/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index b1e8e59642c6e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsRegistrationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebAppsRegistration model - = BinaryData.fromString("{\"clientId\":\"vqdra\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("vqdra", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("vqdra"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("vqdra", 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 ac919338da7b1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebApps model - = BinaryData.fromString("{\"enabled\":true,\"registration\":{\"clientId\":\"gnxkrxdqmidtth\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = new AzureStaticWebApps().withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("gnxkrxdqmidtth")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java deleted file mode 100644 index e847c5141ae2e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.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.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"id\":\"i\",\"name\":\"rvkdvjsllrm\",\"type\":\"d\",\"location\":\"t\",\"properties\":{\"category\":\"pulexxbczw\",\"meterType\":\"uwiqzb\",\"displayName\":\"vsovmyokac\"}},{\"id\":\"kwlhzdo\",\"name\":\"xjmflbvv\",\"type\":\"hrk\",\"location\":\"wwzjuqkhrsajiwku\",\"properties\":{\"category\":\"skghsauuimj\",\"meterType\":\"xieduugidyjrr\",\"displayName\":\"y\"}},{\"id\":\"svexcsonpclhoco\",\"name\":\"lkevle\",\"type\":\"zfbuhf\",\"location\":\"axkffei\",\"properties\":{\"category\":\"lvmezyvshxmzsbbz\",\"meterType\":\"gigr\",\"displayName\":\"burvjxxjnspy\"}},{\"id\":\"tko\",\"name\":\"kouknvudwtiu\",\"type\":\"ldngkpoci\",\"location\":\"yxoegukgjnp\",\"properties\":{\"category\":\"gygev\",\"meterType\":\"ntypmrbpizcdrqj\",\"displayName\":\"pyd\"}}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("t", model.value().get(0).location()); - Assertions.assertEquals("pulexxbczw", model.value().get(0).properties().category()); - Assertions.assertEquals("uwiqzb", model.value().get(0).properties().meterType()); - Assertions.assertEquals("vsovmyokac", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterCollectionInner model = new BillingMeterCollectionInner().withValue(Arrays.asList( - new BillingMeter().withLocation("t") - .withProperties(new BillingMeterProperties().withCategory("pulexxbczw") - .withMeterType("uwiqzb") - .withDisplayName("vsovmyokac")), - new BillingMeter().withLocation("wwzjuqkhrsajiwku") - .withProperties(new BillingMeterProperties().withCategory("skghsauuimj") - .withMeterType("xieduugidyjrr") - .withDisplayName("y")), - new BillingMeter().withLocation("axkffei") - .withProperties(new BillingMeterProperties().withCategory("lvmezyvshxmzsbbz") - .withMeterType("gigr") - .withDisplayName("burvjxxjnspy")), - new BillingMeter().withLocation("yxoegukgjnp") - .withProperties(new BillingMeterProperties().withCategory("gygev") - .withMeterType("ntypmrbpizcdrqj") - .withDisplayName("pyd")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("t", model.value().get(0).location()); - Assertions.assertEquals("pulexxbczw", model.value().get(0).properties().category()); - Assertions.assertEquals("uwiqzb", model.value().get(0).properties().meterType()); - Assertions.assertEquals("vsovmyokac", 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 17919e9f809b8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterProperties model = BinaryData - .fromString("{\"category\":\"xlwhzlsicoh\",\"meterType\":\"qnwvlrya\",\"displayName\":\"hheunmmqhgyx\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("xlwhzlsicoh", model.category()); - Assertions.assertEquals("qnwvlrya", model.meterType()); - Assertions.assertEquals("hheunmmqhgyx", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = new BillingMeterProperties().withCategory("xlwhzlsicoh") - .withMeterType("qnwvlrya") - .withDisplayName("hheunmmqhgyx"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("xlwhzlsicoh", model.category()); - Assertions.assertEquals("qnwvlrya", model.meterType()); - Assertions.assertEquals("hheunmmqhgyx", 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 ca547a5da703d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.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.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeter model = BinaryData.fromString( - "{\"id\":\"yhxdeoejzicwi\",\"name\":\"jttgzf\",\"type\":\"shcbkhajdeyeamdp\",\"location\":\"alpbuxwgipwhon\",\"properties\":{\"category\":\"gshwankixz\",\"meterType\":\"njeputtmrywn\",\"displayName\":\"oqftiyqzrnkcq\"}}") - .toObject(BillingMeter.class); - Assertions.assertEquals("alpbuxwgipwhon", model.location()); - Assertions.assertEquals("gshwankixz", model.properties().category()); - Assertions.assertEquals("njeputtmrywn", model.properties().meterType()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model = new BillingMeter().withLocation("alpbuxwgipwhon") - .withProperties(new BillingMeterProperties().withCategory("gshwankixz") - .withMeterType("njeputtmrywn") - .withDisplayName("oqftiyqzrnkcq")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("alpbuxwgipwhon", model.location()); - Assertions.assertEquals("gshwankixz", model.properties().category()); - Assertions.assertEquals("njeputtmrywn", model.properties().meterType()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java deleted file mode 100644 index d717b2f6c02b5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BillingMetersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"be\",\"name\":\"gis\",\"type\":\"wnykdidjchlrmpw\",\"location\":\"fldseacdhz\",\"properties\":{\"category\":\"brfgdrwji\",\"meterType\":\"whfjsrwqrxe\",\"displayName\":\"gcwvrrmdqntycna\"}},{\"id\":\"hvmaxgnuyeamcmhu\",\"name\":\"jecehokwc\",\"type\":\"twloesqr\",\"location\":\"rbnyrukoilacidu\",\"properties\":{\"category\":\"e\",\"meterType\":\"jlhwyxpzruzyt\",\"displayName\":\"kkwhbgxvellvulnx\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BillingMeterCollection response - = manager.billingMeters().getWithResponse("eboywhczzqrhm", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("fldseacdhz", response.value().get(0).location()); - Assertions.assertEquals("brfgdrwji", response.value().get(0).properties().category()); - Assertions.assertEquals("whfjsrwqrxe", response.value().get(0).properties().meterType()); - Assertions.assertEquals("gcwvrrmdqntycna", response.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java deleted file mode 100644 index 2a153852a41be..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BlobStorageTokenStore; -import org.junit.jupiter.api.Assertions; - -public final class BlobStorageTokenStoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BlobStorageTokenStore model - = BinaryData.fromString("{\"sasUrlSettingName\":\"gtzxdpn\"}").toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("gtzxdpn", model.sasUrlSettingName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BlobStorageTokenStore model = new BlobStorageTokenStore().withSasUrlSettingName("gtzxdpn"); - model = BinaryData.fromObject(model).toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("gtzxdpn", model.sasUrlSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java deleted file mode 100644 index 8175c424fad9d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuildConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildConfiguration model = BinaryData.fromString( - "{\"baseOs\":\"krvrns\",\"platform\":\"hqjohxcrsbfova\",\"platformVersion\":\"ruvw\",\"environmentVariables\":[{\"name\":\"qfsubcgjbirx\",\"value\":\"pybsrfbjfdtw\"},{\"name\":\"sotftpvj\",\"value\":\"bexilzznfqqnv\"},{\"name\":\"pmqtaru\",\"value\":\"ujmkcjhwqy\"},{\"name\":\"jrybnwjewgdrjer\",\"value\":\"naenqpehindo\"}],\"preBuildSteps\":[{\"description\":\"fthnzdn\",\"scripts\":[\"gnayqigynduh\"],\"httpGet\":{\"url\":\"hqlkthumaqo\",\"fileName\":\"gycdu\",\"headers\":[\"tgccymvaolpss\"]}},{\"description\":\"lfmmdnbbglzpswi\",\"scripts\":[\"cwyhzdxssa\",\"bzmnvdfznud\",\"od\",\"xzb\"],\"httpGet\":{\"url\":\"blylpstdbh\",\"fileName\":\"srzdzucerscdn\",\"headers\":[\"vfiwjmygtdss\",\"s\",\"tmweriofzpyq\"]}},{\"description\":\"mwabnetshhszhedp\",\"scripts\":[\"iwubmwmbesldnk\",\"wtppjflcxogaoko\"],\"httpGet\":{\"url\":\"m\",\"fileName\":\"ikvmkqzeqqk\",\"headers\":[\"fzxmhhvhgureodkw\"]}}]}") - .toObject(BuildConfiguration.class); - Assertions.assertEquals("krvrns", model.baseOs()); - Assertions.assertEquals("hqjohxcrsbfova", model.platform()); - Assertions.assertEquals("ruvw", model.platformVersion()); - Assertions.assertEquals("qfsubcgjbirx", model.environmentVariables().get(0).name()); - Assertions.assertEquals("pybsrfbjfdtw", model.environmentVariables().get(0).value()); - Assertions.assertEquals("fthnzdn", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("gnayqigynduh", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("hqlkthumaqo", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("gycdu", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("tgccymvaolpss", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildConfiguration model = new BuildConfiguration().withBaseOs("krvrns") - .withPlatform("hqjohxcrsbfova") - .withPlatformVersion("ruvw") - .withEnvironmentVariables( - Arrays.asList(new EnvironmentVariable().withName("qfsubcgjbirx").withValue("pybsrfbjfdtw"), - new EnvironmentVariable().withName("sotftpvj").withValue("bexilzznfqqnv"), - new EnvironmentVariable().withName("pmqtaru").withValue("ujmkcjhwqy"), - new EnvironmentVariable().withName("jrybnwjewgdrjer").withValue("naenqpehindo"))) - .withPreBuildSteps(Arrays.asList( - new PreBuildStep().withDescription("fthnzdn") - .withScripts(Arrays.asList("gnayqigynduh")) - .withHttpGet(new HttpGet().withUrl("hqlkthumaqo") - .withFileName("gycdu") - .withHeaders(Arrays.asList("tgccymvaolpss"))), - new PreBuildStep().withDescription("lfmmdnbbglzpswi") - .withScripts(Arrays.asList("cwyhzdxssa", "bzmnvdfznud", "od", "xzb")) - .withHttpGet(new HttpGet().withUrl("blylpstdbh") - .withFileName("srzdzucerscdn") - .withHeaders(Arrays.asList("vfiwjmygtdss", "s", "tmweriofzpyq"))), - new PreBuildStep().withDescription("mwabnetshhszhedp") - .withScripts(Arrays.asList("iwubmwmbesldnk", "wtppjflcxogaoko")) - .withHttpGet(new HttpGet().withUrl("m") - .withFileName("ikvmkqzeqqk") - .withHeaders(Arrays.asList("fzxmhhvhgureodkw"))))); - model = BinaryData.fromObject(model).toObject(BuildConfiguration.class); - Assertions.assertEquals("krvrns", model.baseOs()); - Assertions.assertEquals("hqjohxcrsbfova", model.platform()); - Assertions.assertEquals("ruvw", model.platformVersion()); - Assertions.assertEquals("qfsubcgjbirx", model.environmentVariables().get(0).name()); - Assertions.assertEquals("pybsrfbjfdtw", model.environmentVariables().get(0).value()); - Assertions.assertEquals("fthnzdn", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("gnayqigynduh", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("hqlkthumaqo", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("gycdu", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("tgccymvaolpss", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java deleted file mode 100644 index 9207783c5a364..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.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.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderCollection; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"cukoklyaxuconu\",\"containerRegistries\":[{\"containerRegistryServer\":\"fkbey\",\"identityResourceId\":\"ewrmjmwvvjektc\"}]},\"identity\":{\"principalId\":\"b502ae21-f589-4fa0-a7ba-00ae0449adc1\",\"tenantId\":\"f2a103f0-b442-484b-a6e3-d0b70eabeeea\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ffrzpwvlqdqgbiqy\":{\"principalId\":\"99322b52-b2f5-472e-b94e-7aba4c2b7596\",\"clientId\":\"64929267-ab5e-41c2-84a0-16f27737d69a\"}}},\"location\":\"hkaetcktvfc\",\"tags\":{\"jf\":\"snkymuctq\",\"fuwutttxf\":\"ebrjcxe\",\"hfnljkyq\":\"jrbirphxepcyv\"},\"id\":\"j\",\"name\":\"uujqgidokgjljyo\",\"type\":\"gvcl\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"ncghkje\",\"containerRegistries\":[{\"containerRegistryServer\":\"hbijhtxfvgxb\",\"identityResourceId\":\"smx\"},{\"containerRegistryServer\":\"eh\",\"identityResourceId\":\"pvecxgodeb\"},{\"containerRegistryServer\":\"qkkrb\",\"identityResourceId\":\"pukgriwflzlfb\"}]},\"identity\":{\"principalId\":\"f8d71d1d-c123-4c06-b5b0-4a2c6c063865\",\"tenantId\":\"dc9135c6-0982-4390-97db-74dbd091bc85\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pnq\":{\"principalId\":\"d2909f3b-343a-4172-893e-8c6ceaaa9759\",\"clientId\":\"5d679b82-70fd-4f62-9b14-b6aede729213\"},\"mgkbrpyydhibn\":{\"principalId\":\"11873bb2-b0a4-40ec-9604-c0687d42610b\",\"clientId\":\"2171c563-d1fa-4ee8-9bed-4ec971ba4fbf\"},\"kpikadrgvt\":{\"principalId\":\"4ec29524-beca-4dad-9b3f-6ca45829aec8\",\"clientId\":\"22f5410d-e367-444b-865b-44e3344602d7\"},\"n\":{\"principalId\":\"89e804e7-9156-4621-bf2f-ea15b6df8bd5\",\"clientId\":\"681a5331-9f9e-4614-937e-4615869b14dd\"}}},\"location\":\"ynhijggme\",\"tags\":{\"zmhjrunmp\":\"iarbutrcvpna\",\"nkxmyskpbhenbtk\":\"ttdbhrbnl\",\"yxczfclh\":\"xywnytnrsynlqidy\"},\"id\":\"axdbabph\",\"name\":\"wrqlfktsthsuco\",\"type\":\"mnyyazt\"}],\"nextLink\":\"twwrqp\"}") - .toObject(BuilderCollection.class); - Assertions.assertEquals("hkaetcktvfc", model.value().get(0).location()); - Assertions.assertEquals("snkymuctq", model.value().get(0).tags().get("jf")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("cukoklyaxuconu", model.value().get(0).environmentId()); - Assertions.assertEquals("fkbey", model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ewrmjmwvvjektc", - model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("twwrqp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderCollection model - = new BuilderCollection() - .withValue(Arrays.asList( - new BuilderResourceInner().withLocation("hkaetcktvfc") - .withTags(mapOf("jf", "snkymuctq", "fuwutttxf", "ebrjcxe", "hfnljkyq", "jrbirphxepcyv")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ffrzpwvlqdqgbiqy", new UserAssignedIdentity()))) - .withEnvironmentId("cukoklyaxuconu") - .withContainerRegistries( - Arrays.asList(new ContainerRegistry().withContainerRegistryServer("fkbey") - .withIdentityResourceId("ewrmjmwvvjektc"))), - new BuilderResourceInner().withLocation("ynhijggme") - .withTags(mapOf("zmhjrunmp", "iarbutrcvpna", "nkxmyskpbhenbtk", "ttdbhrbnl", "yxczfclh", - "xywnytnrsynlqidy")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("pnq", new UserAssignedIdentity(), "mgkbrpyydhibn", - new UserAssignedIdentity(), "kpikadrgvt", new UserAssignedIdentity(), "n", - new UserAssignedIdentity()))) - .withEnvironmentId("ncghkje") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("hbijhtxfvgxb") - .withIdentityResourceId("smx"), - new ContainerRegistry().withContainerRegistryServer("eh") - .withIdentityResourceId("pvecxgodeb"), - new ContainerRegistry().withContainerRegistryServer("qkkrb") - .withIdentityResourceId("pukgriwflzlfb"))))) - .withNextLink("twwrqp"); - model = BinaryData.fromObject(model).toObject(BuilderCollection.class); - Assertions.assertEquals("hkaetcktvfc", model.value().get(0).location()); - Assertions.assertEquals("snkymuctq", model.value().get(0).tags().get("jf")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("cukoklyaxuconu", model.value().get(0).environmentId()); - Assertions.assertEquals("fkbey", model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ewrmjmwvvjektc", - model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("twwrqp", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java deleted file mode 100644 index 1aad5781596c2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.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.BuilderProperties; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuilderPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"environmentId\":\"lxotogtwrupq\",\"containerRegistries\":[{\"containerRegistryServer\":\"nmic\",\"identityResourceId\":\"kvceoveilovnotyf\"}]}") - .toObject(BuilderProperties.class); - Assertions.assertEquals("lxotogtwrupq", model.environmentId()); - Assertions.assertEquals("nmic", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("kvceoveilovnotyf", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderProperties model = new BuilderProperties().withEnvironmentId("lxotogtwrupq") - .withContainerRegistries(Arrays.asList(new ContainerRegistry().withContainerRegistryServer("nmic") - .withIdentityResourceId("kvceoveilovnotyf"))); - model = BinaryData.fromObject(model).toObject(BuilderProperties.class); - Assertions.assertEquals("lxotogtwrupq", model.environmentId()); - Assertions.assertEquals("nmic", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("kvceoveilovnotyf", model.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java deleted file mode 100644 index bafd3958d0699..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"kzywbiex\",\"containerRegistries\":[{\"containerRegistryServer\":\"yueaxibxujwb\",\"identityResourceId\":\"qwalmuzyoxaepd\"},{\"containerRegistryServer\":\"zjancuxr\",\"identityResourceId\":\"d\"},{\"containerRegistryServer\":\"bavxbniwdjswzt\",\"identityResourceId\":\"dbpgnxytxhp\"},{\"containerRegistryServer\":\"xbzpfzab\",\"identityResourceId\":\"lcuhxwtctyqiklb\"}]},\"identity\":{\"principalId\":\"11ce5dd3-3355-4e01-85d7-15a3c0b48a12\",\"tenantId\":\"1e44fa63-3b4a-4982-a729-ace3958efcd9\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vgyuguos\":{\"principalId\":\"0839b9ff-81ac-4ede-8dee-f067587ffa69\",\"clientId\":\"fc6edf30-08b3-46ab-8b85-bd6c0c615cd2\"},\"fssxqukkfplg\":{\"principalId\":\"eac29657-46e0-4b6a-a431-86ef2bea7454\",\"clientId\":\"622149a9-aab8-48a8-b91c-2a89f293d4fb\"},\"xnkjzkdesl\":{\"principalId\":\"7d34e1be-1f20-4fee-b691-c14f4c4bfeff\",\"clientId\":\"381584d8-2454-49e3-849e-8ed084a14f8d\"}}},\"location\":\"lopwiyig\",\"tags\":{\"upedeojnabckhs\":\"kdwzbaiuebbaumny\",\"ie\":\"txp\"},\"id\":\"tfhvpesapskrdqmh\",\"name\":\"jdhtldwkyzxu\",\"type\":\"tkncwsc\"}") - .toObject(BuilderResourceInner.class); - Assertions.assertEquals("lopwiyig", model.location()); - Assertions.assertEquals("kdwzbaiuebbaumny", model.tags().get("upedeojnabckhs")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("kzywbiex", model.environmentId()); - Assertions.assertEquals("yueaxibxujwb", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("qwalmuzyoxaepd", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceInner model = new BuilderResourceInner().withLocation("lopwiyig") - .withTags(mapOf("upedeojnabckhs", "kdwzbaiuebbaumny", "ie", "txp")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("vgyuguos", new UserAssignedIdentity(), "fssxqukkfplg", - new UserAssignedIdentity(), "xnkjzkdesl", new UserAssignedIdentity()))) - .withEnvironmentId("kzywbiex") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("yueaxibxujwb") - .withIdentityResourceId("qwalmuzyoxaepd"), - new ContainerRegistry().withContainerRegistryServer("zjancuxr").withIdentityResourceId("d"), - new ContainerRegistry().withContainerRegistryServer("bavxbniwdjswzt") - .withIdentityResourceId("dbpgnxytxhp"), - new ContainerRegistry().withContainerRegistryServer("xbzpfzab") - .withIdentityResourceId("lcuhxwtctyqiklb"))); - model = BinaryData.fromObject(model).toObject(BuilderResourceInner.class); - Assertions.assertEquals("lopwiyig", model.location()); - Assertions.assertEquals("kdwzbaiuebbaumny", model.tags().get("upedeojnabckhs")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("kzywbiex", model.environmentId()); - Assertions.assertEquals("yueaxibxujwb", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("qwalmuzyoxaepd", model.containerRegistries().get(0).identityResourceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java deleted file mode 100644 index 7410f4e047e6c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.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.BuilderResourceUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdateProperties model = BinaryData.fromString("{\"environmentId\":\"suyonobglaocq\"}") - .toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("suyonobglaocq", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdateProperties model - = new BuilderResourceUpdateProperties().withEnvironmentId("suyonobglaocq"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("suyonobglaocq", model.environmentId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java deleted file mode 100644 index e29086d35f2a3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"b4104829-5349-4778-88a0-75a1d17d0f27\",\"tenantId\":\"c7c8ed8f-6676-43e1-946b-eba852da6263\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hoxus\":{\"principalId\":\"5c89f141-3aad-45b9-b682-eda412c10ec9\",\"clientId\":\"9b79cffa-f8c2-41d0-af24-09054047b57c\"},\"abgy\":{\"principalId\":\"eca30c6f-90e0-4c72-ab6b-abf0d0b9e132\",\"clientId\":\"91424844-23c7-479e-a878-f29a05571ed5\"}}},\"tags\":{\"ef\":\"bjtazqugxywpmu\"},\"properties\":{\"environmentId\":\"fqkquj\"}}") - .toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bjtazqugxywpmu", model.tags().get("ef")); - Assertions.assertEquals("fqkquj", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdate model = new BuilderResourceUpdate() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("hoxus", new UserAssignedIdentity(), "abgy", new UserAssignedIdentity()))) - .withTags(mapOf("ef", "bjtazqugxywpmu")) - .withEnvironmentId("fqkquj"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bjtazqugxywpmu", model.tags().get("ef")); - Assertions.assertEquals("fqkquj", model.environmentId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java deleted file mode 100644 index f2d2580e27c47..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.nio.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 reactor.core.publisher.Mono; - -public final class BuildersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"bffljfiimreoag\",\"containerRegistries\":[{\"containerRegistryServer\":\"aadusrexxfa\",\"identityResourceId\":\"sqwudohzilfmnli\"},{\"containerRegistryServer\":\"psimsf\",\"identityResourceId\":\"ypofqpmbhyqgs\"}]},\"identity\":{\"principalId\":\"dbeb826f-5966-47e8-a0ea-9ce1156e63cf\",\"tenantId\":\"afbc9f5c-7a57-43c7-aab5-b8a782238c6d\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"phgerhsmvgoh\":{\"principalId\":\"3bcc308f-00e3-40eb-8f8e-98e89cc157cf\",\"clientId\":\"5dd3f164-da66-46c2-bffc-e1c034fa15f8\"},\"mqilrixysfnimsqy\":{\"principalId\":\"8ede5bf3-3767-4ed2-a7a1-c4b20bc12dbb\",\"clientId\":\"ee130c3f-aa00-4094-abd1-4df2dc549960\"}}},\"location\":\"wmhkruwaedrympml\",\"tags\":{\"ewihapfji\":\"nhzd\"},\"id\":\"knjdiqfliejhp\",\"name\":\"lbiedfsbw\",\"type\":\"eivbvz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BuilderResource response = manager.builders() - .define("llpquevhamfo") - .withRegion("msfe") - .withExistingResourceGroup("xlaj") - .withTags(mapOf("dagrhrdicxdw", "ihpq", "vcxjsgbipcukdvek", "jfowxwy", "scrdp", "buhoduchv")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("sztekxby", new UserAssignedIdentity()))) - .withEnvironmentId("tmk") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("pkzwa").withIdentityResourceId("xofqovchi"))) - .create(); - - Assertions.assertEquals("wmhkruwaedrympml", response.location()); - Assertions.assertEquals("nhzd", response.tags().get("ewihapfji")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("bffljfiimreoag", response.environmentId()); - Assertions.assertEquals("aadusrexxfa", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("sqwudohzilfmnli", response.containerRegistries().get(0).identityResourceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index cb2addf56ce17..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BuildersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"environmentId\":\"fkmkrokz\",\"containerRegistries\":[{\"containerRegistryServer\":\"qetwpqrtvaozn\",\"identityResourceId\":\"ni\"}]},\"identity\":{\"principalId\":\"ba6e51e4-1ee4-4d69-a120-9a42ea39d20a\",\"tenantId\":\"8d6d8289-77c8-4de7-a16a-e474749730b2\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"eituugedhfpjs\":{\"principalId\":\"4d427c5b-8daa-4f9a-8d35-9f6281dd12b9\",\"clientId\":\"180ae505-e3b6-4262-a17f-ed8d26ef472e\"},\"mbl\":{\"principalId\":\"939cb210-b1d7-4bb0-a3d2-aeff21f61c14\",\"clientId\":\"7bc239a6-8301-4ce6-83fe-6c20a25c91e5\"},\"deolctaebfs\":{\"principalId\":\"6e994a96-436b-4e8f-9b1b-6e92e3358bce\",\"clientId\":\"a6fe1d89-d8e6-4bc8-9af1-a803ee589397\"},\"edjc\":{\"principalId\":\"6a9bb5ea-c9d8-4143-92dc-6c0177bb2466\",\"clientId\":\"80878c0f-d388-4d56-a8ff-f71cb5db3025\"}}},\"location\":\"tb\",\"tags\":{\"vsgeafgf\":\"igdx\",\"kkwa\":\"sehxlzsxezp\"},\"id\":\"es\",\"name\":\"yfjlpzeqto\",\"type\":\"rpl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BuilderResource response = manager.builders() - .getByResourceGroupWithResponse("wp", "gmfalkzazmgoked", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tb", response.location()); - Assertions.assertEquals("igdx", response.tags().get("vsgeafgf")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("fkmkrokz", response.environmentId()); - Assertions.assertEquals("qetwpqrtvaozn", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ni", response.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java deleted file mode 100644 index 89a2078168142..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BuildersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"umljcirvpef\",\"containerRegistries\":[{\"containerRegistryServer\":\"veitit\",\"identityResourceId\":\"nsxzajlns\"}]},\"identity\":{\"principalId\":\"82ee0be0-090e-4ccc-818f-81f37399dca8\",\"tenantId\":\"e06e5929-004b-4bc5-85f0-b7255f9c8376\",\"type\":\"None\",\"userAssignedIdentities\":{\"xqvmvuay\":{\"principalId\":\"ebdb161f-384c-40a8-8c97-1ade775ffd9c\",\"clientId\":\"28b5e898-e0fa-4cc9-9d87-8d3f196899ba\"},\"dxk\":{\"principalId\":\"829c9a90-8bc7-479a-899e-a6db4e80e245\",\"clientId\":\"f2bc9f76-b941-4611-9c17-3c102575ee8b\"}}},\"location\":\"qbwpntghyk\",\"tags\":{\"vlzladl\":\"cdrnxsl\",\"pbqhvfdqqjwkr\":\"x\",\"atuztjct\":\"wzdanojisgglmvo\",\"wakwseivmakxhys\":\"bpvbkaehxsmzygd\"},\"id\":\"wljuxlkbectvt\",\"name\":\"j\",\"type\":\"skdchmaiubavl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.builders().listByResourceGroup("ipowza", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qbwpntghyk", response.iterator().next().location()); - Assertions.assertEquals("cdrnxsl", response.iterator().next().tags().get("vlzladl")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("umljcirvpef", response.iterator().next().environmentId()); - Assertions.assertEquals("veitit", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("nsxzajlns", - response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java deleted file mode 100644 index 908c8ec4cec38..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BuildersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"tmujdtvmc\",\"containerRegistries\":[{\"containerRegistryServer\":\"mffhmjpddnyxfzuv\",\"identityResourceId\":\"zmzqmzjqrb\"},{\"containerRegistryServer\":\"pv\",\"identityResourceId\":\"mdyfoebojtj\"},{\"containerRegistryServer\":\"pglaoh\",\"identityResourceId\":\"qk\"},{\"containerRegistryServer\":\"jtnqjil\",\"identityResourceId\":\"ywkdcwmqsy\"}]},\"identity\":{\"principalId\":\"a6c4dba2-7077-46c7-a447-22dfdb374749\",\"tenantId\":\"f2b99858-5986-4633-b851-3c9ec92b6cc5\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"olfylnkk\":{\"principalId\":\"596b75fa-9014-4fc6-b75a-6c5e936eb1c0\",\"clientId\":\"7a73b4fb-49aa-4b27-abd6-d00f8c1657ad\"},\"jvlywl\":{\"principalId\":\"6ad6ea75-0980-4e32-b8a3-b2f780cad67a\",\"clientId\":\"ce40fed6-f1e0-4839-9b38-d55f4e1a1d12\"},\"wob\":{\"principalId\":\"1c971f5b-1ac9-4c6e-a61c-463113d7fb8b\",\"clientId\":\"2c199dfe-7ccd-4b28-9911-babc45923327\"}}},\"location\":\"whlwy\",\"tags\":{\"zgczeu\":\"qzocr\",\"iekoif\":\"tgxdncaqt\",\"gyrihlgm\":\"vnyttzgi\"},\"id\":\"behlqtxnr\",\"name\":\"lkndrndpgfjodh\",\"type\":\"aqotwfhipxwgsabv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.builders().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("whlwy", response.iterator().next().location()); - Assertions.assertEquals("qzocr", response.iterator().next().tags().get("zgczeu")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("tmujdtvmc", response.iterator().next().environmentId()); - Assertions.assertEquals("mffhmjpddnyxfzuv", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("zmzqmzjqrb", - response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java deleted file mode 100644 index ae06599597a7a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.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.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificatePatch model = BinaryData - .fromString("{\"tags\":{\"hykojoxafnndlpic\":\"btkuwhh\",\"h\":\"koymkcd\",\"reqnovvqfov\":\"pkkpw\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("btkuwhh", model.tags().get("hykojoxafnndlpic")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = new CertificatePatch() - .withTags(mapOf("hykojoxafnndlpic", "btkuwhh", "h", "koymkcd", "reqnovvqfov", "pkkpw")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("btkuwhh", model.tags().get("hykojoxafnndlpic")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index c753e51e63f95..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.certificates() - .deleteWithResponse("gyqvpbfjpoqzuc", "zluczdq", "urbormvh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 84965423a916d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"dqrhzoymib\",\"type\":\"qyib\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("dqrhzoymib", model.name()); - Assertions.assertEquals("qyib", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("dqrhzoymib").withType("qyib"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("dqrhzoymib", model.name()); - Assertions.assertEquals("qyib", 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 01966c42400f5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model = BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"szdtmhrkwof\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("szdtmhrkwof", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = new CheckNameAvailabilityResponseInner().withNameAvailable(false) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("szdtmhrkwof"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("szdtmhrkwof", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java deleted file mode 100644 index bc782075a14c8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.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.CircuitBreakerPolicy; -import org.junit.jupiter.api.Assertions; - -public final class CircuitBreakerPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CircuitBreakerPolicy model = BinaryData - .fromString( - "{\"consecutiveErrors\":1722437661,\"intervalInSeconds\":1946289710,\"maxEjectionPercent\":158340850}") - .toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CircuitBreakerPolicy model = new CircuitBreakerPolicy().withConsecutiveErrors(1722437661) - .withIntervalInSeconds(1946289710) - .withMaxEjectionPercent(158340850); - model = BinaryData.fromObject(model).toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index f8733d4fc9e02..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironmentsCertificates() - .deleteWithResponse("ftksd", "gdnk", "fgmwd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 8e0eae441a5d3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"jxlehzlx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = manager.connectedEnvironments() - .checkNameAvailabilityWithResponse("hpqatiwkkvyanxk", "vcsemsvuvdj", - new CheckNameAvailabilityRequest().withName("xetqmm").withType("vrjjxnw"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("jxlehzlx", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index 4fa6e43b8c9b9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironmentsDaprComponents() - .deleteWithResponse("nwpiwxeiicrm", "e", "kldmaxxijv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index a712f1e0a4bc6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"oqar\",\"value\":\"yxqicladv\"},{\"name\":\"davuqmcbyms\",\"value\":\"bjlquv\"},{\"name\":\"zcjumvpsimioyoig\",\"value\":\"miqwnnrac\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = manager.connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("kwsdgkj", "yacwrasekwefc", "o", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 14512788ddea7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("wsxnsrqor", "genmvceb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index ea94c52d4cc70..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironmentsStorages() - .deleteWithResponse("n", "pgb", "offbkkwvdxaexqok", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java deleted file mode 100644 index ee7a881e8575a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.ReplicaExecutionStatus; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppJobExecutionsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppJobExecutionsInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"mt\",\"id\":\"iwenazero\",\"type\":\"rs\",\"properties\":{\"status\":\"Succeeded\",\"startTime\":\"2020-12-24T05:18:03Z\",\"endTime\":\"2021-09-29T20:04:11Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{},{}]},\"detailedStatus\":{\"replicas\":[{},{}]}}},{\"name\":\"cve\",\"id\":\"mzhhkuuipldqqc\",\"type\":\"kva\",\"properties\":{\"status\":\"Running\",\"startTime\":\"2021-01-01T12:19:53Z\",\"endTime\":\"2021-08-04T07:59:56Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{}]},\"detailedStatus\":{\"replicas\":[{}]}}},{\"name\":\"mxhzzysevus\",\"id\":\"vzrrryveimi\",\"type\":\"kdyzatvfuzk\",\"properties\":{\"status\":\"Unknown\",\"startTime\":\"2021-03-25T16:42:15Z\",\"endTime\":\"2021-09-01T14:42:15Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{}]},\"detailedStatus\":{\"replicas\":[{}]}}},{\"name\":\"qdsmjtg\",\"id\":\"gdgkki\",\"type\":\"plkcsm\",\"properties\":{\"status\":\"Running\",\"startTime\":\"2021-01-22T21:03:21Z\",\"endTime\":\"2021-01-01T04:41:03Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{}]},\"detailedStatus\":{\"replicas\":[{},{},{}]}}}],\"nextLink\":\"loyg\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("mt", model.value().get(0).name()); - Assertions.assertEquals("iwenazero", model.value().get(0).id()); - Assertions.assertEquals("rs", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T05:18:03Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T20:04:11Z"), model.value().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppJobExecutionsInner model = new ContainerAppJobExecutionsInner().withValue(Arrays.asList( - new JobExecutionInner().withName("mt") - .withId("iwenazero") - .withType("rs") - .withStartTime(OffsetDateTime.parse("2020-12-24T05:18:03Z")) - .withEndTime(OffsetDateTime.parse("2021-09-29T20:04:11Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus() - .withReplicas(Arrays.asList(new ReplicaExecutionStatus(), new ReplicaExecutionStatus()))), - new JobExecutionInner().withName("cve") - .withId("mzhhkuuipldqqc") - .withType("kva") - .withStartTime(OffsetDateTime.parse("2021-01-01T12:19:53Z")) - .withEndTime(OffsetDateTime.parse("2021-08-04T07:59:56Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList(new ReplicaExecutionStatus()))), - new JobExecutionInner().withName("mxhzzysevus") - .withId("vzrrryveimi") - .withType("kdyzatvfuzk") - .withStartTime(OffsetDateTime.parse("2021-03-25T16:42:15Z")) - .withEndTime(OffsetDateTime.parse("2021-09-01T14:42:15Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList(new ReplicaExecutionStatus()))), - new JobExecutionInner().withName("qdsmjtg") - .withId("gdgkki") - .withType("plkcsm") - .withStartTime(OffsetDateTime.parse("2021-01-22T21:03:21Z")) - .withEndTime(OffsetDateTime.parse("2021-01-01T04:41:03Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList(new ReplicaExecutionStatus(), - new ReplicaExecutionStatus(), new ReplicaExecutionStatus()))))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("mt", model.value().get(0).name()); - Assertions.assertEquals("iwenazero", model.value().get(0).id()); - Assertions.assertEquals("rs", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T05:18:03Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T20:04:11Z"), model.value().get(0).endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java deleted file mode 100644 index 360fd724fe38b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = BinaryData.fromString("{\"name\":\"zlwfffiakp\",\"value\":\"pqqmted\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("zlwfffiakp", model.name()); - Assertions.assertEquals("pqqmted", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = new ContainerAppProbeHttpGetHttpHeadersItem().withName("zlwfffiakp").withValue("pqqmted"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("zlwfffiakp", model.name()); - Assertions.assertEquals("pqqmted", 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 616d90b5b19b8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.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.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGet model = BinaryData.fromString( - "{\"host\":\"qkagfhsxt\",\"httpHeaders\":[{\"name\":\"gzxnfaazpxdtnk\",\"value\":\"mkqjj\"},{\"name\":\"wuenvr\",\"value\":\"pyouaibrebqaays\"}],\"path\":\"ixqtn\",\"port\":1555595528,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("qkagfhsxt", model.host()); - Assertions.assertEquals("gzxnfaazpxdtnk", model.httpHeaders().get(0).name()); - Assertions.assertEquals("mkqjj", model.httpHeaders().get(0).value()); - Assertions.assertEquals("ixqtn", model.path()); - Assertions.assertEquals(1555595528, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model = new ContainerAppProbeHttpGet().withHost("qkagfhsxt") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("gzxnfaazpxdtnk").withValue("mkqjj"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("wuenvr").withValue("pyouaibrebqaays"))) - .withPath("ixqtn") - .withPort(1555595528) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("qkagfhsxt", model.host()); - Assertions.assertEquals("gzxnfaazpxdtnk", model.httpHeaders().get(0).name()); - Assertions.assertEquals("mkqjj", model.httpHeaders().get(0).value()); - Assertions.assertEquals("ixqtn", model.path()); - Assertions.assertEquals(1555595528, 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 dd4e94e4c4277..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.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.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTcpSocketTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeTcpSocket model = BinaryData.fromString("{\"host\":\"mmji\",\"port\":1755412090}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mmji", model.host()); - Assertions.assertEquals(1755412090, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model = new ContainerAppProbeTcpSocket().withHost("mmji").withPort(1755412090); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mmji", model.host()); - Assertions.assertEquals(1755412090, 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 787c58fb6e912..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.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.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbe model = BinaryData.fromString( - "{\"failureThreshold\":884290238,\"httpGet\":{\"host\":\"mcwaekrrjr\",\"httpHeaders\":[{\"name\":\"xt\",\"value\":\"gumhjglikkxws\"},{\"name\":\"olbq\",\"value\":\"vuzlm\"}],\"path\":\"elfk\",\"port\":2091794134,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":556961865,\"periodSeconds\":763625934,\"successThreshold\":1477595722,\"tcpSocket\":{\"host\":\"noigbrnjwmwk\",\"port\":1312335759},\"terminationGracePeriodSeconds\":2791971078148352021,\"timeoutSeconds\":1740415327,\"type\":\"Readiness\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(884290238, model.failureThreshold()); - Assertions.assertEquals("mcwaekrrjr", model.httpGet().host()); - Assertions.assertEquals("xt", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("gumhjglikkxws", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("elfk", model.httpGet().path()); - Assertions.assertEquals(2091794134, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(556961865, model.initialDelaySeconds()); - Assertions.assertEquals(763625934, model.periodSeconds()); - Assertions.assertEquals(1477595722, model.successThreshold()); - Assertions.assertEquals("noigbrnjwmwk", model.tcpSocket().host()); - Assertions.assertEquals(1312335759, model.tcpSocket().port()); - Assertions.assertEquals(2791971078148352021L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(1740415327, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = new ContainerAppProbe().withFailureThreshold(884290238) - .withHttpGet(new ContainerAppProbeHttpGet().withHost("mcwaekrrjr") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("xt").withValue("gumhjglikkxws"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("olbq").withValue("vuzlm"))) - .withPath("elfk") - .withPort(2091794134) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(556961865) - .withPeriodSeconds(763625934) - .withSuccessThreshold(1477595722) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("noigbrnjwmwk").withPort(1312335759)) - .withTerminationGracePeriodSeconds(2791971078148352021L) - .withTimeoutSeconds(1740415327) - .withType(Type.READINESS); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(884290238, model.failureThreshold()); - Assertions.assertEquals("mcwaekrrjr", model.httpGet().host()); - Assertions.assertEquals("xt", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("gumhjglikkxws", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("elfk", model.httpGet().path()); - Assertions.assertEquals(2091794134, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(556961865, model.initialDelaySeconds()); - Assertions.assertEquals(763625934, model.periodSeconds()); - Assertions.assertEquals(1477595722, model.successThreshold()); - Assertions.assertEquals("noigbrnjwmwk", model.tcpSocket().host()); - Assertions.assertEquals(1312335759, model.tcpSocket().port()); - Assertions.assertEquals(2791971078148352021L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(1740415327, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesPatchingConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesPatchingConfigurationTests.java deleted file mode 100644 index cd8986918d3a1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesPatchingConfigurationTests.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.ContainerAppPropertiesPatchingConfiguration; -import com.azure.resourcemanager.appcontainers.models.PatchingMode; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppPropertiesPatchingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppPropertiesPatchingConfiguration model = BinaryData.fromString("{\"patchingMode\":\"Automatic\"}") - .toObject(ContainerAppPropertiesPatchingConfiguration.class); - Assertions.assertEquals(PatchingMode.AUTOMATIC, model.patchingMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppPropertiesPatchingConfiguration model - = new ContainerAppPropertiesPatchingConfiguration().withPatchingMode(PatchingMode.AUTOMATIC); - model = BinaryData.fromObject(model).toObject(ContainerAppPropertiesPatchingConfiguration.class); - Assertions.assertEquals(PatchingMode.AUTOMATIC, model.patchingMode()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java deleted file mode 100644 index 1948b239a7f62..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsAuthConfigs() - .deleteWithResponse("vidmytzl", "glxpnovyoanfbcsw", "agyw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildCollectionTests.java deleted file mode 100644 index a0559076850b6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildCollectionTests.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.fluent.models.ContainerAppsBuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppsBuildCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"xcv\",\"image\":\"rhnj\"},\"configuration\":{\"baseOs\":\"lvtno\",\"platform\":\"fzg\",\"platformVersion\":\"jdftuljltd\",\"environmentVariables\":[{\"name\":\"amtmcz\",\"value\":\"o\"},{\"name\":\"ejwcwwqiok\",\"value\":\"ssxmojms\"}],\"preBuildSteps\":[{},{}]},\"logStreamEndpoint\":\"prvkwcfzqljyxgtc\"},\"id\":\"eydbsd\",\"name\":\"hmkxmaehvbb\",\"type\":\"uripltfnhtba\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"buildStatus\":\"Canceled\",\"destinationContainerRegistry\":{\"server\":\"ckpyklyhplu\",\"image\":\"pvruudlg\"},\"configuration\":{\"baseOs\":\"thost\",\"platform\":\"tstvdxeclzedq\",\"platformVersion\":\"vh\",\"environmentVariables\":[{\"name\":\"plodqkdlwwqfbu\",\"value\":\"lkxt\"}],\"preBuildSteps\":[{},{},{},{}]},\"logStreamEndpoint\":\"smlmbtxhwgfwsrta\"},\"id\":\"oezbrhubsk\",\"name\":\"udygooo\",\"type\":\"kqfqjbvl\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"iqtqzfavyvnq\",\"image\":\"bar\"},\"configuration\":{\"baseOs\":\"ayjkqa\",\"platform\":\"gzslesjcbhernnti\",\"platformVersion\":\"djc\",\"environmentVariables\":[{\"name\":\"uwrbehwagoh\",\"value\":\"uffkmrqemvvh\"},{\"name\":\"xtdr\",\"value\":\"futacoebjvewzc\"},{\"name\":\"znmwcp\",\"value\":\"guaadraufactkahz\"}],\"preBuildSteps\":[{},{},{},{}]},\"logStreamEndpoint\":\"j\"},\"id\":\"uxxpshne\",\"name\":\"kulfg\",\"type\":\"lqubkwdlen\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"bazpjuohmi\",\"image\":\"flnorwmduvwp\"},\"configuration\":{\"baseOs\":\"xwmygdxpgpqc\",\"platform\":\"sze\",\"platformVersion\":\"nb\",\"environmentVariables\":[{\"name\":\"xgibbda\",\"value\":\"confozauors\"},{\"name\":\"kokwbqplhlvnu\",\"value\":\"epzl\"}],\"preBuildSteps\":[{}]},\"logStreamEndpoint\":\"zsoldwey\"},\"id\":\"dunvmnnrwrbiorkt\",\"name\":\"lywjhh\",\"type\":\"dnhxmsi\"}],\"nextLink\":\"omi\"}") - .toObject(ContainerAppsBuildCollection.class); - Assertions.assertEquals("omi", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildCollection model = new ContainerAppsBuildCollection() - .withValue(Arrays.asList(new ContainerAppsBuildResourceInner(), new ContainerAppsBuildResourceInner(), - new ContainerAppsBuildResourceInner(), new ContainerAppsBuildResourceInner())) - .withNextLink("omi"); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildCollection.class); - Assertions.assertEquals("omi", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.java deleted file mode 100644 index 75dbd97dee39c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.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.ContainerAppsBuildConfiguration; - -public final class ContainerAppsBuildConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildConfiguration model = BinaryData.fromString( - "{\"baseOs\":\"qyikvy\",\"platform\":\"uyav\",\"platformVersion\":\"wmn\",\"environmentVariables\":[{\"name\":\"tijfybvp\",\"value\":\"ekrsgs\"},{\"name\":\"b\",\"value\":\"huzqgn\"},{\"name\":\"dgkynscliqhzvhxn\",\"value\":\"omtkub\"},{\"name\":\"tppn\",\"value\":\"dxzxhi\"}],\"preBuildSteps\":[{\"description\":\"b\",\"scripts\":[\"qagt\",\"tdhlfkqo\",\"py\"],\"httpGet\":{\"url\":\"gtrd\",\"fileName\":\"ifmzzsd\",\"headers\":[\"rnysux\"]}},{\"description\":\"rafwgckhocxvdf\",\"scripts\":[\"afqr\",\"udaspavehh\"],\"httpGet\":{\"url\":\"kbunzoz\",\"fileName\":\"hcxgkmoyx\",\"headers\":[\"uibhmfdnbzydvfv\",\"cjnaeoisrvhmgor\"]}}]}") - .toObject(ContainerAppsBuildConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildConfiguration model = new ContainerAppsBuildConfiguration(); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.java deleted file mode 100644 index 2c8b1be30ae82..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.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.fluent.models.ContainerAppsBuildProperties; - -public final class ContainerAppsBuildPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"wsmystuluqypf\",\"image\":\"lerchpq\"},\"configuration\":{\"baseOs\":\"pjbabwidfc\",\"platform\":\"spuunnoxyhkxgq\",\"platformVersion\":\"rihpfhoq\",\"environmentVariables\":[{\"name\":\"ewda\",\"value\":\"mdjvlpj\"}],\"preBuildSteps\":[{\"description\":\"brm\",\"scripts\":[\"ivsiy\",\"zkdnc\",\"dxonbzoggculap\"],\"httpGet\":{\"url\":\"y\",\"fileName\":\"gogtqxepnylbf\",\"headers\":[\"lyjt\",\"vofqzhvfc\",\"byfmowuxr\"]}},{\"description\":\"pvdwxf\",\"scripts\":[\"ivwzjbhyzs\",\"jrkambtrnegvmnv\",\"q\",\"qvldspastjbkkd\"],\"httpGet\":{\"url\":\"lves\",\"fileName\":\"jlxr\",\"headers\":[\"ozapeew\",\"hpxlktwkuziycs\",\"evufuztck\",\"yhjtqedcgzu\"]}},{\"description\":\"mmrqz\",\"scripts\":[\"jvpglydzgk\",\"vqeevtoep\",\"yutnwytpzdmov\",\"vf\"],\"httpGet\":{\"url\":\"awzqadfl\",\"fileName\":\"ur\",\"headers\":[\"aecxndtic\",\"kpvzmlq\",\"mldgxobfirc\"]}},{\"description\":\"pkc\",\"scripts\":[\"zriykhy\",\"wf\"],\"httpGet\":{\"url\":\"lboxqvkjl\",\"fileName\":\"ho\",\"headers\":[\"nhdwdigumbnra\",\"uzzptjazysdz\",\"ezwwv\"]}}]},\"logStreamEndpoint\":\"qyuvvfonkp\"}") - .toObject(ContainerAppsBuildProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildProperties model = new ContainerAppsBuildProperties(); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildProperties.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.java deleted file mode 100644 index 72392beab6210..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.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.fluent.models.ContainerAppsBuildResourceInner; - -public final class ContainerAppsBuildResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"buildStatus\":\"InProgress\",\"destinationContainerRegistry\":{\"server\":\"fi\",\"image\":\"dieuzaofj\"},\"configuration\":{\"baseOs\":\"cyyysfgdot\",\"platform\":\"biipuip\",\"platformVersion\":\"qonmacj\",\"environmentVariables\":[{\"name\":\"izsh\",\"value\":\"vcimpev\"},{\"name\":\"gmblrri\",\"value\":\"bywdxsmicc\"},{\"name\":\"rwfscjfnynszquj\",\"value\":\"zdvoqytibyowbb\"}],\"preBuildSteps\":[{\"description\":\"vutpthjoxo\",\"scripts\":[\"sks\",\"pi\"],\"httpGet\":{\"url\":\"qolj\",\"fileName\":\"cgxxlxs\",\"headers\":[\"cvizqzdwlvw\",\"youpfgfbkj\",\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"]}},{\"description\":\"gzukxitmm\",\"scripts\":[\"qqqxhrnxrx\",\"pjui\"],\"httpGet\":{\"url\":\"vokqdzfv\",\"fileName\":\"ivjlfrqttbajlka\",\"headers\":[\"xyiopidkqqfku\",\"s\",\"xkdmligo\"]}},{\"description\":\"brxk\",\"scripts\":[\"oaz\",\"ruocbgo\",\"rb\",\"eoybfhjxakvvjgs\"],\"httpGet\":{\"url\":\"r\",\"fileName\":\"lmywwtkgkxnyed\",\"headers\":[\"yvudtjuewbci\",\"xuuwhcj\",\"xccybvpa\"]}},{\"description\":\"kkudzp\",\"scripts\":[\"jplmagstcy\",\"hpfkyrkdbdgi\"],\"httpGet\":{\"url\":\"sjkmnwqj\",\"fileName\":\"baiyhddviaceg\",\"headers\":[\"ntfpmvmemfnc\"]}}]},\"logStreamEndpoint\":\"wvvb\"},\"id\":\"xlllchp\",\"name\":\"db\",\"type\":\"evwrdnhfuk\"}") - .toObject(ContainerAppsBuildResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildResourceInner model = new ContainerAppsBuildResourceInner(); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildResourceInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.java deleted file mode 100644 index 7f83903ed163f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsBuildsByContainerAppsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"lrupjovmo\",\"image\":\"ayeb\"},\"configuration\":{\"baseOs\":\"wzlpzbtz\",\"platform\":\"kykipfsdyepfnoc\",\"platformVersion\":\"ezacfpztga\",\"environmentVariables\":[{\"name\":\"qejg\",\"value\":\"aokctgkp\"},{\"name\":\"gkqzkcyzmffngdyf\",\"value\":\"ixrhl\"}],\"preBuildSteps\":[{\"description\":\"oejgoiutgwrmkah\",\"scripts\":[\"azyntacihncogm\",\"pnmliq\",\"v\",\"bhikeaqgr\"],\"httpGet\":{\"url\":\"pomxpu\"}},{\"description\":\"tsdfjyieso\",\"scripts\":[\"qb\",\"outmp\"],\"httpGet\":{\"url\":\"gleofjsbgbw\"}}]},\"logStreamEndpoint\":\"vdajfwn\"},\"id\":\"fmaciqgjjrlhiq\",\"name\":\"wixvtbouguxtndop\",\"type\":\"jtt\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.containerAppsBuildsByContainerApps() - .list("ieuscplhyvdgx", "yzkxitds", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.java deleted file mode 100644 index f93ed6b5c3864..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsBuildsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"buildStatus\":\"Canceled\",\"destinationContainerRegistry\":{\"server\":\"spugzfeuzjljmph\",\"image\":\"yezolgjzmicu\"},\"configuration\":{\"baseOs\":\"ccn\",\"platform\":\"hanzbuiad\",\"platformVersion\":\"atecaa\",\"environmentVariables\":[{\"name\":\"o\",\"value\":\"zn\"},{\"name\":\"ucbdaom\",\"value\":\"wiinjdllw\"},{\"name\":\"tlepowavvqxua\",\"value\":\"g\"},{\"name\":\"qwulynkgfcfdru\",\"value\":\"si\"}],\"preBuildSteps\":[{\"description\":\"clhuulriqbyokv\",\"scripts\":[\"zsxebr\",\"lttfyhc\",\"jwsuoardnag\",\"tpufpbpgnrholhu\"],\"httpGet\":{\"url\":\"fwxi\"}},{\"description\":\"kysolsyjprxs\",\"scripts\":[\"dmcvhtbbz\",\"hfvhuwzbxpcqz\"],\"httpGet\":{\"url\":\"hotjec\"}},{\"description\":\"mx\",\"scripts\":[\"rrskapbxwieexuy\",\"derltfokyksyim\"],\"httpGet\":{\"url\":\"cgrvkcxzznnuifer\"}},{\"description\":\"jegprk\",\"scripts\":[\"wrjmwv\"],\"httpGet\":{\"url\":\"tu\"}}]},\"logStreamEndpoint\":\"xximwgxq\"},\"id\":\"ekotjgxi\",\"name\":\"qfkyfhiwvjaqu\",\"type\":\"by\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppsBuildResource response = manager.containerAppsBuilds() - .getWithResponse("asualapdlndbea", "bkixvvlwyn", "bb", com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 a904ea0c05680..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("idoyzl", "giomqo", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 199ec636d58b2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"metadata\":{\"id\":\"xxcrqmipfjwfoy\",\"name\":\"zms\",\"description\":\"xbaizab\",\"author\":\"nvgskjtoxjd\",\"category\":\"sjznvhx\",\"supportTopicList\":[{\"id\":\"i\",\"pesId\":\"y\"},{\"id\":\"fn\",\"pesId\":\"c\"},{\"id\":\"tfshksnyzm\",\"pesId\":\"amwbwmbnlslcef\"}],\"analysisTypes\":[\"ktwtk\"],\"type\":\"hlpfliw\",\"score\":61.39023},\"dataset\":[{\"table\":{\"tableName\":\"hwvladpc\",\"columns\":[{}],\"rows\":[\"datausybke\"]},\"renderingProperties\":{\"type\":1019694129,\"title\":\"ztsilscvq\",\"description\":\"eiihfymko\",\"isVisible\":false}},{\"table\":{\"tableName\":\"seuugcig\",\"columns\":[{},{},{}],\"rows\":[\"datamgbvmtdwrqbe\"]},\"renderingProperties\":{\"type\":642467230,\"title\":\"eglabtvkbiwznhtf\",\"description\":\"icudyhizpa\",\"isVisible\":true}}],\"status\":{\"message\":\"bcakzn\",\"statusId\":1389422036},\"dataProviderMetadata\":{\"providerName\":\"itwhrjsdmmazdnck\",\"propertyBag\":[{\"name\":\"pglhzqp\",\"value\":\"bawkikcdg\"}]}},\"id\":\"bssdpjeyoqxd\",\"name\":\"decfiwhagxsure\",\"type\":\"qrshzzbgullcxiq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = manager.containerAppsDiagnostics() - .getDetectorWithResponse("toqcahfsgbjm", "reesrfwsszvl", "wliso", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ktwtk", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("hwvladpc", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1019694129, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("ztsilscvq", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("eiihfymko", - response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("bcakzn", response.properties().status().message()); - Assertions.assertEquals(1389422036, response.properties().status().statusId()); - Assertions.assertEquals("itwhrjsdmmazdnck", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("pglhzqp", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("bawkikcdg", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index b4414d752572e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"oxpdxq\",\"name\":\"r\",\"description\":\"qownkiuajewnahw\",\"author\":\"jjmztnlmsoodtmv\",\"category\":\"dhdyswcrptveaj\",\"supportTopicList\":[{\"id\":\"lgsrgkrfizrpywlp\",\"pesId\":\"uqhrlmcskykp\"}],\"analysisTypes\":[\"fixcnpcfykkpy\"],\"type\":\"pawmpjprdp\",\"score\":39.779915},\"dataset\":[{\"table\":{\"tableName\":\"fjfw\",\"columns\":[{},{}],\"rows\":[\"datawk\",\"datayep\"]},\"renderingProperties\":{\"type\":206009156,\"title\":\"nidmdiaw\",\"description\":\"xkzrn\",\"isVisible\":false}},{\"table\":{\"tableName\":\"dhuosgwqpsqa\",\"columns\":[{},{}],\"rows\":[\"datadvqgcnbhcbmjkz\",\"dataibniynts\",\"datajmfmeftvhkm\",\"dataogjrhskbwgm\"]},\"renderingProperties\":{\"type\":165219531,\"title\":\"cfogxhcxnwjt\",\"description\":\"dzxcouzfwo\",\"isVisible\":false}}],\"status\":{\"message\":\"kzkdtzxsoednlwg\",\"statusId\":2125278836},\"dataProviderMetadata\":{\"providerName\":\"o\",\"propertyBag\":[{\"name\":\"qgisnionetbzdrd\",\"value\":\"enx\"}]}},\"id\":\"tlzlmtrlxcznnhz\",\"name\":\"bnbmxlxm\",\"type\":\"tygeqzus\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ffbbcngkegxcypxb", "fetwi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fixcnpcfykkpy", - response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("fjfw", response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(206009156, - response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("nidmdiaw", - response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xkzrn", - response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, - response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("kzkdtzxsoednlwg", response.iterator().next().properties().status().message()); - Assertions.assertEquals(2125278836, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("o", response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("qgisnionetbzdrd", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("enx", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchResourceInnerTests.java deleted file mode 100644 index bca42c6b7bc5c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchResourceInnerTests.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.fluent.models.ContainerAppsPatchResourceInner; - -public final class ContainerAppsPatchResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsPatchResourceInner model = BinaryData.fromString( - "{\"properties\":{\"targetEnvironmentId\":\"cqusr\",\"targetContainerAppId\":\"etnwsdtutnw\",\"targetRevisionId\":\"uycvuzhyrmewip\",\"patchApplyStatus\":\"ManuallySkipped\",\"createdAt\":\"2021-11-09T10:02:58Z\",\"lastModifiedAt\":\"2021-05-05T15:12:47Z\",\"patchDetails\":[{\"targetContainerName\":\"qgsjjxun\",\"targetImage\":\"xgketwz\",\"lastDetectionTime\":\"2021-11-18T05:28:11Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"hfjmhvv\",\"newLayer\":{\"name\":\"gpmuneqsxvmhfbuz\",\"frameworkAndVersion\":\"ihsasb\",\"osAndVersion\":\"dyp\"},\"oldLayer\":{\"name\":\"uemsly\",\"frameworkAndVersion\":\"qyrp\",\"osAndVersion\":\"obrltt\"},\"patchType\":\"Other\"},{\"targetContainerName\":\"jnygq\",\"targetImage\":\"nfwqzdzgtilaxhn\",\"lastDetectionTime\":\"2021-04-20T12:15:53Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"yvi\",\"newLayer\":{\"name\":\"wivkxo\",\"frameworkAndVersion\":\"un\",\"osAndVersion\":\"xxrtikvc\"},\"oldLayer\":{\"name\":\"gclrci\",\"frameworkAndVersion\":\"soxfrken\",\"osAndVersion\":\"m\"},\"patchType\":\"FrameworkSecurity\"}]},\"id\":\"rpmpdnqqskaw\",\"name\":\"oqvm\",\"type\":\"bnpqfrtqlkzme\"}") - .toObject(ContainerAppsPatchResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsPatchResourceInner model = new ContainerAppsPatchResourceInner(); - model = BinaryData.fromObject(model).toObject(ContainerAppsPatchResourceInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.java deleted file mode 100644 index e0125a5ecf43f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsPatchesApplyMockTests { - @Test - public void testApply() throws Exception { - String responseStr - = "{\"properties\":{\"targetEnvironmentId\":\"tfjikffffgkuh\",\"targetContainerAppId\":\"whvuldbkk\",\"targetRevisionId\":\"jkjigawgaz\",\"patchApplyStatus\":\"RebaseFailed\",\"createdAt\":\"2021-07-17T19:23:56Z\",\"lastModifiedAt\":\"2021-03-12T04:48:13Z\",\"patchDetails\":[{\"targetContainerName\":\"jsbcml\",\"targetImage\":\"aahzbhuroolkol\",\"lastDetectionTime\":\"2021-03-29T10:52:42Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"mojusuz\",\"newLayer\":{\"name\":\"zcvaaxoialahfxwc\",\"frameworkAndVersion\":\"kdxkuk\",\"osAndVersion\":\"c\"},\"oldLayer\":{\"name\":\"uhhoqeqshavlj\",\"frameworkAndVersion\":\"xyrqo\",\"osAndVersion\":\"thbb\"},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"zukwdrnzkj\",\"targetImage\":\"hfceyjncjm\",\"lastDetectionTime\":\"2021-12-08T19:24:03Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"fjbpfiddhlrufzcq\",\"newLayer\":{\"name\":\"qrfuiocusel\",\"frameworkAndVersion\":\"rsazrhxud\",\"osAndVersion\":\"mdtff\"},\"oldLayer\":{\"name\":\"mrkkhmwd\",\"frameworkAndVersion\":\"lgyqixokw\",\"osAndVersion\":\"awhva\"},\"patchType\":\"Other\"},{\"targetContainerName\":\"fqqdl\",\"targetImage\":\"vmyolcaym\",\"lastDetectionTime\":\"2021-04-25T03:05:01Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"vsnvlaq\",\"newLayer\":{\"name\":\"yzawatu\",\"frameworkAndVersion\":\"kokb\",\"osAndVersion\":\"othymgobl\"},\"oldLayer\":{\"name\":\"nwgwimaanea\",\"frameworkAndVersion\":\"t\",\"osAndVersion\":\"obcyanrfvqtvk\"},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"oog\",\"targetImage\":\"kfnaoaqymhc\",\"lastDetectionTime\":\"2021-08-22T04:15:50Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"uowyrnskbyhqu\",\"newLayer\":{\"name\":\"ygxvha\",\"frameworkAndVersion\":\"xecxqnwh\",\"osAndVersion\":\"ozawmvgxsmpk\"},\"oldLayer\":{\"name\":\"irfljf\",\"frameworkAndVersion\":\"xqou\",\"osAndVersion\":\"ud\"},\"patchType\":\"Other\"}]},\"id\":\"aprhknqiijgencdg\",\"name\":\"oqueqihkkyowltj\",\"type\":\"uwhldxwhieproqks\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppsPatchResource response = manager.containerAppsPatches() - .apply("akt", "jktzboimyfpq", "owkppnwyytf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.java deleted file mode 100644 index b11649d073103..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsPatchesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"targetEnvironmentId\":\"coybaj\",\"targetContainerAppId\":\"qubfajcyw\",\"targetRevisionId\":\"qwmchqohtfxc\",\"patchApplyStatus\":\"Canceled\",\"createdAt\":\"2021-11-23T12:25:12Z\",\"lastModifiedAt\":\"2021-01-03T15:25:04Z\",\"patchDetails\":[{\"targetContainerName\":\"zpwdlvwtiwsmo\",\"targetImage\":\"aonhqnamppul\",\"lastDetectionTime\":\"2021-11-30T08:03:43Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"aekewnazea\",\"newLayer\":{\"name\":\"aj\",\"frameworkAndVersion\":\"yizyddcvxodk\",\"osAndVersion\":\"fsxxby\"},\"oldLayer\":{\"name\":\"qlvge\",\"frameworkAndVersion\":\"wgoljtzx\",\"osAndVersion\":\"xsdobygoogxqapjx\"},\"patchType\":\"OSSecurity\"}]},\"id\":\"jfucsaodjnosdkv\",\"name\":\"bfas\",\"type\":\"matrnzpducd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppsPatchResource response = manager.containerAppsPatches() - .getWithResponse("qontwhymxymulw", "vqtow", "h", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.java deleted file mode 100644 index b3f0b03a03532..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsPatchesListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"targetEnvironmentId\":\"bccwkqmtxapeqi\",\"targetContainerAppId\":\"rpilgftrqrejdaah\",\"targetRevisionId\":\"imldahlfxlmu\",\"patchApplyStatus\":\"ManuallySkipped\",\"createdAt\":\"2021-01-23T23:04:38Z\",\"lastModifiedAt\":\"2021-02-11T10:09:19Z\",\"patchDetails\":[{\"targetContainerName\":\"snc\",\"targetImage\":\"kiioshj\",\"lastDetectionTime\":\"2020-12-28T23:46:20Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"tybnxgztlcgctj\",\"newLayer\":{\"name\":\"j\",\"frameworkAndVersion\":\"ywjzebecuvlbefvw\",\"osAndVersion\":\"jkxpylrwoxzgwpsy\"},\"oldLayer\":{\"name\":\"jeypdvrbkerdk\",\"frameworkAndVersion\":\"gaw\",\"osAndVersion\":\"jxildfkcef\"},\"patchType\":\"OSSecurity\"}]},\"id\":\"q\",\"name\":\"jo\",\"type\":\"sfmnaybdjnxumen\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.containerAppsPatches() - .listByContainerApp("nvskpaj", "mgeu", "exmj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java deleted file mode 100644 index 19ae1756b7629..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Replica; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests { - @Test - public void testGetReplicaWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"createdTime\":\"2021-02-18T03:30:55Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"nbg\",\"containers\":[{\"name\":\"dorgmynltw\",\"containerId\":\"ftmfoeajogsy\",\"ready\":true,\"started\":false,\"restartCount\":1917204796,\"runningState\":\"Running\",\"runningStateDetails\":\"vlkpzwb\",\"logStreamEndpoint\":\"recchdidrmu\",\"execEndpoint\":\"ahmjedbiu\",\"debugEndpoint\":\"khhwmj\"}],\"initContainers\":[{\"name\":\"eunxcqrrihufoi\",\"containerId\":\"piybxvgnzuzpbg\",\"ready\":true,\"started\":false,\"restartCount\":1335795506,\"runningState\":\"Waiting\",\"runningStateDetails\":\"kunhdimjuk\",\"logStreamEndpoint\":\"r\",\"execEndpoint\":\"a\",\"debugEndpoint\":\"pucdocf\"},{\"name\":\"lwgofm\",\"containerId\":\"wrjlvzkl\",\"ready\":true,\"started\":true,\"restartCount\":104707977,\"runningState\":\"Running\",\"runningStateDetails\":\"akvlbishj\",\"logStreamEndpoint\":\"zaptuosk\",\"execEndpoint\":\"izjixwfgcd\",\"debugEndpoint\":\"kkcxwnujvqynvav\"}]},\"id\":\"mdmuqoh\",\"name\":\"ihraxqudd\",\"type\":\"wjc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Replica response = manager.containerAppsRevisionReplicas() - .getReplicaWithResponse("hudsmusuaa", "jakx", "jnfczmnniixy", "vqban", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dorgmynltw", response.containers().get(0).name()); - Assertions.assertEquals("ftmfoeajogsy", response.containers().get(0).containerId()); - Assertions.assertEquals(true, response.containers().get(0).ready()); - Assertions.assertEquals(false, response.containers().get(0).started()); - Assertions.assertEquals(1917204796, response.containers().get(0).restartCount()); - Assertions.assertEquals("eunxcqrrihufoi", response.initContainers().get(0).name()); - Assertions.assertEquals("piybxvgnzuzpbg", response.initContainers().get(0).containerId()); - Assertions.assertEquals(true, response.initContainers().get(0).ready()); - Assertions.assertEquals(false, response.initContainers().get(0).started()); - Assertions.assertEquals(1335795506, response.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java deleted file mode 100644 index a6468c9396479..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasListReplicasWithResponseMockTests { - @Test - public void testListReplicasWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-12-02T01:42:45Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"viqlluk\",\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{},{}]},\"id\":\"gcbv\",\"name\":\"a\",\"type\":\"mqcbpokstsinv\"},{\"properties\":{\"createdTime\":\"2021-11-27T01:48:46Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"d\",\"containers\":[{},{}],\"initContainers\":[{},{}]},\"id\":\"cehqw\",\"name\":\"itxnmxgnmgu\",\"type\":\"buwvorba\"},{\"properties\":{\"createdTime\":\"2021-02-26T19:00:19Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"dhlltqstqkqsyg\",\"containers\":[{},{}],\"initContainers\":[{},{},{},{}]},\"id\":\"ovagzkheuban\",\"name\":\"xunpqcckqiawzlz\",\"type\":\"laslgacizux\"},{\"properties\":{\"createdTime\":\"2021-05-21T14:34:58Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"wsaudoejtighsxj\",\"containers\":[{},{}],\"initContainers\":[{},{}]},\"id\":\"bala\",\"name\":\"ovu\",\"type\":\"wxhmehjnhjiot\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicaCollection response = manager.containerAppsRevisionReplicas() - .listReplicasWithResponse("jbrhlhpvzadbw", "nnin", "fhxrzfr", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java deleted file mode 100644 index 8d70ca8627f0d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsActivateRevisionWithResponseMockTests { - @Test - public void testActivateRevisionWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsRevisions() - .activateRevisionWithResponse("edpqlrfbo", "xi", "mlnfyz", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java deleted file mode 100644 index 6820c0c628b51..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests { - @Test - public void testDeactivateRevisionWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsRevisions() - .deactivateRevisionWithResponse("vfrbypic", "bkpdjtaqhsmq", "zpdgonjhxshthmgp", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java deleted file mode 100644 index f5a557f27fc23..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsRestartRevisionWithResponseMockTests { - @Test - public void testRestartRevisionWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsRevisions() - .restartRevisionWithResponse("zqulptkbv", "pxtzhigqqbtimpk", "blornsih", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 1bbcf5803f39e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hqpoilosja", "mcezevftmhllpok", "yghz", "ms", false, true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java deleted file mode 100644 index b0a3b6d30acee..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.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.ContainerRegistry; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistry model - = BinaryData.fromString("{\"containerRegistryServer\":\"fcnj\",\"identityResourceId\":\"k\"}") - .toObject(ContainerRegistry.class); - Assertions.assertEquals("fcnj", model.containerRegistryServer()); - Assertions.assertEquals("k", model.identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistry model - = new ContainerRegistry().withContainerRegistryServer("fcnj").withIdentityResourceId("k"); - model = BinaryData.fromObject(model).toObject(ContainerRegistry.class); - Assertions.assertEquals("fcnj", model.containerRegistryServer()); - Assertions.assertEquals("k", model.identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java deleted file mode 100644 index 0c5dc4ce6151e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryWithCustomImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistryWithCustomImage model - = BinaryData.fromString("{\"server\":\"bhsfxob\",\"image\":\"tkblmpewww\"}") - .toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bhsfxob", model.server()); - Assertions.assertEquals("tkblmpewww", model.image()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistryWithCustomImage model - = new ContainerRegistryWithCustomImage().withServer("bhsfxob").withImage("tkblmpewww"); - model = BinaryData.fromObject(model).toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bhsfxob", model.server()); - Assertions.assertEquals("tkblmpewww", model.image()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index 8d436633849b8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResources model - = BinaryData.fromString("{\"cpu\":20.95195509760658,\"memory\":\"wep\",\"ephemeralStorage\":\"pc\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(20.95195509760658D, model.cpu()); - Assertions.assertEquals("wep", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(20.95195509760658D).withMemory("wep"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(20.95195509760658D, model.cpu()); - Assertions.assertEquals("wep", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java deleted file mode 100644 index f4de1b2b0cd26..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; - -public final class CookieExpirationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CookieExpiration model - = BinaryData.fromString("{\"convention\":\"FixedTime\",\"timeToExpiration\":\"wxrjfeallnwsub\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("wxrjfeallnwsub", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = new CookieExpiration().withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("wxrjfeallnwsub"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("wxrjfeallnwsub", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java deleted file mode 100644 index 32b7afe028159..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.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.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomain model = BinaryData - .fromString( - "{\"name\":\"bminrfdwoyuhhzi\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"ozbhdmsmlmzq\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("bminrfdwoyuhhzi", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("ozbhdmsmlmzq", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = new CustomDomain().withName("bminrfdwoyuhhzi") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("ozbhdmsmlmzq"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("bminrfdwoyuhhzi", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("ozbhdmsmlmzq", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java deleted file mode 100644 index 921d929a84b85..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.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.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPoliciesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":524957188,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1668703834},\"circuitBreakerPolicy\":{\"consecutiveErrors\":2091511430,\"timeoutInSeconds\":653682799,\"intervalInSeconds\":1265921223}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":236199125,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":570901557},\"circuitBreakerPolicy\":{\"consecutiveErrors\":991430794,\"timeoutInSeconds\":1327259513,\"intervalInSeconds\":989850966}}},\"id\":\"rem\",\"name\":\"hllizhceumoq\",\"type\":\"dkadppyibn\"}],\"nextLink\":\"ladywrxwhyd\"}") - .toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(524957188, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1668703834, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(2091511430, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(653682799, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1265921223, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(236199125, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(570901557, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(991430794, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1327259513, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(989850966, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model = new DaprComponentResiliencyPoliciesCollection() - .withValue(Arrays.asList(new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(524957188) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1668703834)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(2091511430) - .withTimeoutInSeconds(653682799) - .withIntervalInSeconds(1265921223))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(236199125) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(570901557)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(991430794) - .withTimeoutInSeconds(1327259513) - .withIntervalInSeconds(989850966))))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(524957188, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1668703834, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(2091511430, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(653682799, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1265921223, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(236199125, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(570901557, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(991430794, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1327259513, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(989850966, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index dda27ca290cef..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":684721295,\"retryBackOff\":{\"initialDelayInMilliseconds\":1832222772,\"maxIntervalInMilliseconds\":538650932}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1207678234},\"circuitBreakerPolicy\":{\"consecutiveErrors\":215386567,\"timeoutInSeconds\":894709124,\"intervalInSeconds\":1742124939}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1791009241,\"retryBackOff\":{\"initialDelayInMilliseconds\":1119823688,\"maxIntervalInMilliseconds\":1336622134}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1434985054},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1032393727,\"timeoutInSeconds\":1873317873,\"intervalInSeconds\":1609822926}}},\"id\":\"vbbvaqdljnpetl\",\"name\":\"n\",\"type\":\"detawevxehue\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprComponentResiliencyPolicy response = manager.daprComponentResiliencyPolicies() - .define("dror") - .withExistingDaprComponent("qvcml", "exbzbqufpnezsjza", "m") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1314918046) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(34461405) - .withMaxIntervalInMilliseconds(1687575900))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1621039893)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1756639996) - .withTimeoutInSeconds(71262559) - .withIntervalInSeconds(1457823620))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(703393978) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(155050896) - .withMaxIntervalInMilliseconds(1642847010))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(363464701)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1653660645) - .withTimeoutInSeconds(1501466100) - .withIntervalInSeconds(196695741))) - .create(); - - Assertions.assertEquals(684721295, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1832222772, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(538650932, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1207678234, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(215386567, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(894709124, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1742124939, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1791009241, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1119823688, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1336622134, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1434985054, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1032393727, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1873317873, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1609822926, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java deleted file mode 100644 index b32033145bb2c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentResiliencyPoliciesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.daprComponentResiliencyPolicies() - .deleteWithResponse("eswyhh", "ifjua", "xwwvcmmpeg", "y", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java deleted file mode 100644 index ad5da05f5fa05..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentResiliencyPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1038883334,\"retryBackOff\":{\"initialDelayInMilliseconds\":1700371151,\"maxIntervalInMilliseconds\":1374921710}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1935350563},\"circuitBreakerPolicy\":{\"consecutiveErrors\":154512919,\"timeoutInSeconds\":1158815759,\"intervalInSeconds\":703367024}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":725496177,\"retryBackOff\":{\"initialDelayInMilliseconds\":1579451655,\"maxIntervalInMilliseconds\":1723350346}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":171361564},\"circuitBreakerPolicy\":{\"consecutiveErrors\":896726160,\"timeoutInSeconds\":816302370,\"intervalInSeconds\":1468148143}}},\"id\":\"nrra\",\"name\":\"ovrwwx\",\"type\":\"wpjhspboxhifppsk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprComponentResiliencyPolicy response = manager.daprComponentResiliencyPolicies() - .getWithResponse("hxzubfjzabbw", "gvzua", "xcdckixspsa", "gavkmv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(1038883334, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1700371151, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1374921710, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1935350563, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(154512919, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1158815759, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(703367024, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(725496177, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1579451655, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1723350346, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(171361564, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(896726160, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(816302370, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1468148143, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java deleted file mode 100644 index aa267f4e3d5c7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentResiliencyPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":493987363,\"retryBackOff\":{\"initialDelayInMilliseconds\":1346081832,\"maxIntervalInMilliseconds\":154728040}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":250538513},\"circuitBreakerPolicy\":{\"consecutiveErrors\":385419072,\"timeoutInSeconds\":1897243806,\"intervalInSeconds\":837292963}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1771574336,\"retryBackOff\":{\"initialDelayInMilliseconds\":944136407,\"maxIntervalInMilliseconds\":1918010429}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":534856605},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1442218085,\"timeoutInSeconds\":729154649,\"intervalInSeconds\":1444493325}}},\"id\":\"juf\",\"name\":\"ekiooanduewfhv\",\"type\":\"x\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.daprComponentResiliencyPolicies() - .list("pgayiawohfmhnnzm", "cjjkmqenh", "idzr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(493987363, response.iterator().next().inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1346081832, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(154728040, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(250538513, - response.iterator().next().inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(385419072, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1897243806, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(837292963, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1771574336, response.iterator().next().outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(944136407, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1918010429, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(534856605, - response.iterator().next().outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1442218085, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(729154649, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1444493325, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java deleted file mode 100644 index dffb701eab435..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.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.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model = BinaryData - .fromString( - "{\"consecutiveErrors\":865412735,\"timeoutInSeconds\":2077361898,\"intervalInSeconds\":996358381}") - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(865412735, model.consecutiveErrors()); - Assertions.assertEquals(2077361898, model.timeoutInSeconds()); - Assertions.assertEquals(996358381, model.intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model - = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(865412735) - .withTimeoutInSeconds(2077361898) - .withIntervalInSeconds(996358381); - model = BinaryData.fromObject(model) - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(865412735, model.consecutiveErrors()); - Assertions.assertEquals(2077361898, model.timeoutInSeconds()); - Assertions.assertEquals(996358381, model.intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java deleted file mode 100644 index 4bfb688e1928c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.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.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = BinaryData.fromString( - "{\"httpRetryPolicy\":{\"maxRetries\":736323206,\"retryBackOff\":{\"initialDelayInMilliseconds\":1434895356,\"maxIntervalInMilliseconds\":264085794}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":63326432},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1334001807,\"timeoutInSeconds\":1126673643,\"intervalInSeconds\":1466151519}}") - .toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(736323206, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1434895356, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(264085794, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(63326432, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1334001807, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1126673643, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1466151519, model.circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(736323206) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1434895356) - .withMaxIntervalInMilliseconds(264085794))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(63326432)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(1334001807) - .withTimeoutInSeconds(1126673643) - .withIntervalInSeconds(1466151519)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(736323206, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1434895356, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(264085794, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(63326432, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1334001807, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1126673643, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1466151519, model.circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java deleted file mode 100644 index b303ce3418824..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model - = BinaryData.fromString("{\"initialDelayInMilliseconds\":431216153,\"maxIntervalInMilliseconds\":63319486}") - .toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(431216153, model.initialDelayInMilliseconds()); - Assertions.assertEquals(63319486, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration().withInitialDelayInMilliseconds(431216153) - .withMaxIntervalInMilliseconds(63319486); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(431216153, model.initialDelayInMilliseconds()); - Assertions.assertEquals(63319486, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java deleted file mode 100644 index b0935e6437488..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.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.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model = BinaryData.fromString( - "{\"maxRetries\":5260255,\"retryBackOff\":{\"initialDelayInMilliseconds\":1999284303,\"maxIntervalInMilliseconds\":196507131}}") - .toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(5260255, model.maxRetries()); - Assertions.assertEquals(1999284303, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(196507131, model.retryBackOff().maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5260255) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1999284303) - .withMaxIntervalInMilliseconds(196507131)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(5260255, model.maxRetries()); - Assertions.assertEquals(1999284303, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(196507131, model.retryBackOff().maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java deleted file mode 100644 index d129233497f10..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.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.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1122183962,\"retryBackOff\":{\"initialDelayInMilliseconds\":1501723844,\"maxIntervalInMilliseconds\":1498235259}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1437535025},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1352834601,\"timeoutInSeconds\":658051997,\"intervalInSeconds\":1037982388}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1855050027,\"retryBackOff\":{\"initialDelayInMilliseconds\":1748294835,\"maxIntervalInMilliseconds\":1414324336}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1242671016},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1986212179,\"timeoutInSeconds\":397269197,\"intervalInSeconds\":318100229}}},\"id\":\"kltrfow\",\"name\":\"dvrfm\",\"type\":\"lihcvjdrqcr\"}") - .toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1122183962, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1501723844, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1498235259, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1437535025, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1352834601, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(658051997, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1037982388, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1855050027, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1748294835, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1414324336, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1242671016, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1986212179, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(397269197, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(318100229, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyInner model = new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1122183962) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1501723844) - .withMaxIntervalInMilliseconds(1498235259))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1437535025)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1352834601) - .withTimeoutInSeconds(658051997) - .withIntervalInSeconds(1037982388))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1855050027) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1748294835) - .withMaxIntervalInMilliseconds(1414324336))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1242671016)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1986212179) - .withTimeoutInSeconds(397269197) - .withIntervalInSeconds(318100229))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1122183962, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1501723844, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1498235259, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1437535025, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1352834601, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(658051997, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1037982388, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1855050027, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1748294835, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1414324336, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1242671016, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1986212179, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(397269197, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(318100229, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java deleted file mode 100644 index afeeea60b51a4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.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.fluent.models.DaprComponentResiliencyPolicyProperties; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = BinaryData.fromString( - "{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1635048339,\"retryBackOff\":{\"initialDelayInMilliseconds\":953823508,\"maxIntervalInMilliseconds\":1215207387}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1450803819},\"circuitBreakerPolicy\":{\"consecutiveErrors\":950614024,\"timeoutInSeconds\":836172134,\"intervalInSeconds\":1608999558}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1360910741,\"retryBackOff\":{\"initialDelayInMilliseconds\":1251867390,\"maxIntervalInMilliseconds\":189062113}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1754799205},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1416309389,\"timeoutInSeconds\":2095697533,\"intervalInSeconds\":16556749}}}") - .toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1635048339, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(953823508, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1215207387, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1450803819, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(950614024, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(836172134, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1608999558, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1360910741, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1251867390, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(189062113, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1754799205, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1416309389, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(2095697533, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(16556749, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = new DaprComponentResiliencyPolicyProperties() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1635048339) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(953823508) - .withMaxIntervalInMilliseconds(1215207387))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1450803819)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(950614024) - .withTimeoutInSeconds(836172134) - .withIntervalInSeconds(1608999558))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1360910741) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1251867390) - .withMaxIntervalInMilliseconds(189062113))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1754799205)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1416309389) - .withTimeoutInSeconds(2095697533) - .withIntervalInSeconds(16556749))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1635048339, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(953823508, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1215207387, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1450803819, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(950614024, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(836172134, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1608999558, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1360910741, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1251867390, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(189062113, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1754799205, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1416309389, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(2095697533, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(16556749, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java deleted file mode 100644 index 69cc1fb832abb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = BinaryData.fromString("{\"responseTimeoutInSeconds\":1552463925}") - .toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(1552463925, model.responseTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(1552463925); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(1552463925, model.responseTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java deleted file mode 100644 index 5924ffbf2c16d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentServiceBindingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentServiceBinding model = BinaryData.fromString( - "{\"name\":\"epxgyqagvr\",\"serviceId\":\"npkukghimdblx\",\"metadata\":{\"name\":\"mfnjh\",\"value\":\"xw\"}}") - .toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("epxgyqagvr", model.name()); - Assertions.assertEquals("npkukghimdblx", model.serviceId()); - Assertions.assertEquals("mfnjh", model.metadata().name()); - Assertions.assertEquals("xw", model.metadata().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentServiceBinding model = new DaprComponentServiceBinding().withName("epxgyqagvr") - .withServiceId("npkukghimdblx") - .withMetadata(new DaprServiceBindMetadata().withName("mfnjh").withValue("xw")); - model = BinaryData.fromObject(model).toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("epxgyqagvr", model.name()); - Assertions.assertEquals("npkukghimdblx", model.serviceId()); - Assertions.assertEquals("mfnjh", model.metadata().name()); - Assertions.assertEquals("xw", model.metadata().value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index a34c2568ed2ab..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.daprComponents() - .deleteWithResponse("hirc", "gcvsvkkjbjolpy", "klkvuznadvh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index 11e2635b3de7f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"tqszzgyksikawanv\",\"value\":\"dvgjqcrbkompnbnf\"},{\"name\":\"weoj\",\"value\":\"pgcmahiwfr\"},{\"name\":\"w\",\"value\":\"hkapitsks\"},{\"name\":\"yfttibjepzwhju\",\"value\":\"dgbggcjxzh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = manager.daprComponents() - .listSecretsWithResponse("lieo", "gowxxbhtp", "yioqe", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java deleted file mode 100644 index 396200b5e7abf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; - -public final class DaprConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprConfiguration model = BinaryData.fromString("{\"version\":\"c\"}").toObject(DaprConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprConfiguration model = new DaprConfiguration(); - model = BinaryData.fromObject(model).toObject(DaprConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java deleted file mode 100644 index 7d2a9c779fe66..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; - -public final class DaprSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecret model - = BinaryData.fromString("{\"name\":\"enwabfatk\",\"value\":\"dxbjhwuaanozj\"}").toObject(DaprSecret.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecret model = new DaprSecret(); - model = BinaryData.fromObject(model).toObject(DaprSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java deleted file mode 100644 index e84d8e161f1fb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; -import java.util.Arrays; - -public final class DaprSecretsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecretsCollectionInner model - = BinaryData.fromString("{\"value\":[{\"name\":\"vxwc\",\"value\":\"lpcirelsf\"}]}") - .toObject(DaprSecretsCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecretsCollectionInner model = new DaprSecretsCollectionInner().withValue(Arrays.asList(new DaprSecret())); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java deleted file mode 100644 index e288b39e8e0e8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.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.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprServiceBindMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprServiceBindMetadata model = BinaryData.fromString("{\"name\":\"zk\",\"value\":\"oqreyfkzikfjawn\"}") - .toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("zk", model.name()); - Assertions.assertEquals("oqreyfkzikfjawn", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprServiceBindMetadata model = new DaprServiceBindMetadata().withName("zk").withValue("oqreyfkzikfjawn"); - model = BinaryData.fromObject(model).toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("zk", model.name()); - Assertions.assertEquals("oqreyfkzikfjawn", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java deleted file mode 100644 index fbb12e267df8a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.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.DaprSubscriptionBulkSubscribeOptions; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionBulkSubscribeOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = BinaryData - .fromString("{\"enabled\":true,\"maxMessagesCount\":1598918980,\"maxAwaitDurationMs\":655056908}") - .toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1598918980, model.maxMessagesCount()); - Assertions.assertEquals(655056908, model.maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(1598918980) - .withMaxAwaitDurationMs(655056908); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1598918980, model.maxMessagesCount()); - Assertions.assertEquals(655056908, model.maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java deleted file mode 100644 index b002b1e80d2c0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"pubsubName\":\"snbagnchjhg\",\"topic\":\"uowakyw\",\"deadLetterTopic\":\"hjym\",\"routes\":{\"rules\":[{\"match\":\"agdrcls\",\"path\":\"ljomevt\"}],\"default\":\"cnlbv\"},\"scopes\":[\"odk\",\"gjiiytssiki\"],\"metadata\":{\"mqso\":\"ufqbvntnr\",\"cpwzv\":\"hcekxgnlykm\",\"qba\":\"doksqdtiwlwxlbon\",\"xbyja\":\"qicqchygt\"},\"bulkSubscribe\":{\"enabled\":true,\"maxMessagesCount\":2100861051,\"maxAwaitDurationMs\":1434725351}},\"id\":\"yqvgxia\",\"name\":\"detv\",\"type\":\"hkxdxuwsaifmc\"}") - .toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("snbagnchjhg", model.pubsubName()); - Assertions.assertEquals("uowakyw", model.topic()); - Assertions.assertEquals("hjym", model.deadLetterTopic()); - Assertions.assertEquals("agdrcls", model.routes().rules().get(0).match()); - Assertions.assertEquals("ljomevt", model.routes().rules().get(0).path()); - Assertions.assertEquals("cnlbv", model.routes().defaultProperty()); - Assertions.assertEquals("odk", model.scopes().get(0)); - Assertions.assertEquals("ufqbvntnr", model.metadata().get("mqso")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2100861051, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1434725351, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionInner model = new DaprSubscriptionInner().withPubsubName("snbagnchjhg") - .withTopic("uowakyw") - .withDeadLetterTopic("hjym") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("agdrcls").withPath("ljomevt"))) - .withDefaultProperty("cnlbv")) - .withScopes(Arrays.asList("odk", "gjiiytssiki")) - .withMetadata( - mapOf("mqso", "ufqbvntnr", "cpwzv", "hcekxgnlykm", "qba", "doksqdtiwlwxlbon", "xbyja", "qicqchygt")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(2100861051) - .withMaxAwaitDurationMs(1434725351)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("snbagnchjhg", model.pubsubName()); - Assertions.assertEquals("uowakyw", model.topic()); - Assertions.assertEquals("hjym", model.deadLetterTopic()); - Assertions.assertEquals("agdrcls", model.routes().rules().get(0).match()); - Assertions.assertEquals("ljomevt", model.routes().rules().get(0).path()); - Assertions.assertEquals("cnlbv", model.routes().defaultProperty()); - Assertions.assertEquals("odk", model.scopes().get(0)); - Assertions.assertEquals("ufqbvntnr", model.metadata().get("mqso")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2100861051, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1434725351, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java deleted file mode 100644 index 3f94222d48d66..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionProperties; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionProperties model = BinaryData.fromString( - "{\"pubsubName\":\"osbz\",\"topic\":\"hg\",\"deadLetterTopic\":\"kb\",\"routes\":{\"rules\":[{\"match\":\"lgjyyxpvels\",\"path\":\"rqz\"},{\"match\":\"xoqeintxwalj\",\"path\":\"zoblq\"},{\"match\":\"afrqulhm\",\"path\":\"qb\"},{\"match\":\"vafjrqpjiyrqj\",\"path\":\"gaxwmzwdfkbnrzo\"}],\"default\":\"dltb\"},\"scopes\":[\"qjf\",\"xxsaetgz\",\"gvpyigdaqqilzdc\"],\"metadata\":{\"gucaif\":\"joedx\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":505810781,\"maxAwaitDurationMs\":558514412}}") - .toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("osbz", model.pubsubName()); - Assertions.assertEquals("hg", model.topic()); - Assertions.assertEquals("kb", model.deadLetterTopic()); - Assertions.assertEquals("lgjyyxpvels", model.routes().rules().get(0).match()); - Assertions.assertEquals("rqz", model.routes().rules().get(0).path()); - Assertions.assertEquals("dltb", model.routes().defaultProperty()); - Assertions.assertEquals("qjf", model.scopes().get(0)); - Assertions.assertEquals("joedx", model.metadata().get("gucaif")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(505810781, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(558514412, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionProperties model = new DaprSubscriptionProperties().withPubsubName("osbz") - .withTopic("hg") - .withDeadLetterTopic("kb") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("lgjyyxpvels").withPath("rqz"), - new DaprSubscriptionRouteRule().withMatch("xoqeintxwalj").withPath("zoblq"), - new DaprSubscriptionRouteRule().withMatch("afrqulhm").withPath("qb"), - new DaprSubscriptionRouteRule().withMatch("vafjrqpjiyrqj").withPath("gaxwmzwdfkbnrzo"))) - .withDefaultProperty("dltb")) - .withScopes(Arrays.asList("qjf", "xxsaetgz", "gvpyigdaqqilzdc")) - .withMetadata(mapOf("gucaif", "joedx")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(505810781) - .withMaxAwaitDurationMs(558514412)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("osbz", model.pubsubName()); - Assertions.assertEquals("hg", model.topic()); - Assertions.assertEquals("kb", model.deadLetterTopic()); - Assertions.assertEquals("lgjyyxpvels", model.routes().rules().get(0).match()); - Assertions.assertEquals("rqz", model.routes().rules().get(0).path()); - Assertions.assertEquals("dltb", model.routes().defaultProperty()); - Assertions.assertEquals("qjf", model.scopes().get(0)); - Assertions.assertEquals("joedx", model.metadata().get("gucaif")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(505810781, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(558514412, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java deleted file mode 100644 index 0159872f24594..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRouteRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRouteRule model = BinaryData.fromString("{\"match\":\"tuicds\",\"path\":\"dfmmpzhzzwvy\"}") - .toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("tuicds", model.match()); - Assertions.assertEquals("dfmmpzhzzwvy", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRouteRule model = new DaprSubscriptionRouteRule().withMatch("tuicds").withPath("dfmmpzhzzwvy"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("tuicds", model.match()); - Assertions.assertEquals("dfmmpzhzzwvy", model.path()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java deleted file mode 100644 index a7d787d8ab715..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.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.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRoutes model = BinaryData - .fromString("{\"rules\":[{\"match\":\"qqa\",\"path\":\"mkxwxdcvjwcyziak\"}],\"default\":\"iqch\"}") - .toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("qqa", model.rules().get(0).match()); - Assertions.assertEquals("mkxwxdcvjwcyziak", model.rules().get(0).path()); - Assertions.assertEquals("iqch", model.defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRoutes model = new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("qqa").withPath("mkxwxdcvjwcyziak"))) - .withDefaultProperty("iqch"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("qqa", model.rules().get(0).match()); - Assertions.assertEquals("mkxwxdcvjwcyziak", model.rules().get(0).path()); - Assertions.assertEquals("iqch", model.defaultProperty()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java deleted file mode 100644 index e1b5edbfc3387..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"pubsubName\":\"d\",\"topic\":\"llgryfqiuasigr\",\"deadLetterTopic\":\"socnequygdjboq\",\"routes\":{\"rules\":[{},{},{}],\"default\":\"jkqev\"},\"scopes\":[\"mmwiuawvcmjz\",\"xiid\",\"scz\"],\"metadata\":{\"oqiqazugamx\":\"s\",\"cekuz\":\"krrcoiisbamnpp\",\"zxuizhyhnepkpe\":\"dsbezaxyfu\",\"xdazv\":\"iarxqiubxdukec\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":118970540,\"maxAwaitDurationMs\":439594345}},\"id\":\"zudblnsntrpcaq\",\"name\":\"iofkbtfmh\",\"type\":\"lbnld\"},{\"properties\":{\"pubsubName\":\"bh\",\"topic\":\"zyqu\",\"deadLetterTopic\":\"sqxutr\",\"routes\":{\"rules\":[{}],\"default\":\"yuuatvlmbjwcolbm\"},\"scopes\":[\"nwtpcpahprz\"],\"metadata\":{\"nxzcm\":\"hmtfho\",\"sn\":\"hngxnoqrxtd\",\"hepfwwtjfdoes\":\"evhdlmydid\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1541394704,\"maxAwaitDurationMs\":78837183}},\"id\":\"ky\",\"name\":\"ikxkxhneg\",\"type\":\"njzrbhtmeplvu\"}],\"nextLink\":\"obrl\"}") - .toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("d", model.value().get(0).pubsubName()); - Assertions.assertEquals("llgryfqiuasigr", model.value().get(0).topic()); - Assertions.assertEquals("socnequygdjboq", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("jkqev", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("mmwiuawvcmjz", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("s", model.value().get(0).metadata().get("oqiqazugamx")); - Assertions.assertEquals(false, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(118970540, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(439594345, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionsCollection model = new DaprSubscriptionsCollection().withValue(Arrays.asList( - new DaprSubscriptionInner().withPubsubName("d") - .withTopic("llgryfqiuasigr") - .withDeadLetterTopic("socnequygdjboq") - .withRoutes(new DaprSubscriptionRoutes().withRules(Arrays.asList(new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())).withDefaultProperty("jkqev")) - .withScopes(Arrays.asList("mmwiuawvcmjz", "xiid", "scz")) - .withMetadata(mapOf("oqiqazugamx", "s", "cekuz", "krrcoiisbamnpp", "zxuizhyhnepkpe", "dsbezaxyfu", - "xdazv", "iarxqiubxdukec")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(118970540) - .withMaxAwaitDurationMs(439594345)), - new DaprSubscriptionInner().withPubsubName("bh") - .withTopic("zyqu") - .withDeadLetterTopic("sqxutr") - .withRoutes(new DaprSubscriptionRoutes().withRules(Arrays.asList(new DaprSubscriptionRouteRule())) - .withDefaultProperty("yuuatvlmbjwcolbm")) - .withScopes(Arrays.asList("nwtpcpahprz")) - .withMetadata(mapOf("nxzcm", "hmtfho", "sn", "hngxnoqrxtd", "hepfwwtjfdoes", "evhdlmydid")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(1541394704) - .withMaxAwaitDurationMs(78837183)))); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("d", model.value().get(0).pubsubName()); - Assertions.assertEquals("llgryfqiuasigr", model.value().get(0).topic()); - Assertions.assertEquals("socnequygdjboq", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("jkqev", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("mmwiuawvcmjz", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("s", model.value().get(0).metadata().get("oqiqazugamx")); - Assertions.assertEquals(false, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(118970540, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(439594345, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index bf412157e76ce..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.nio.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 reactor.core.publisher.Mono; - -public final class DaprSubscriptionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"pubsubName\":\"dlkhczygpm\",\"topic\":\"jculojhhylx\",\"deadLetterTopic\":\"vfiyymot\",\"routes\":{\"rules\":[{\"match\":\"wjmtftcvelniru\",\"path\":\"qnstpaqpibjg\"},{\"match\":\"swmehfxrttxb\",\"path\":\"ennqfabqca\"},{\"match\":\"lectcxsfmb\",\"path\":\"xmsynbkd\"}],\"default\":\"yufxuzmsvzyq\"},\"scopes\":[\"nxhjtlxfikjk\",\"ara\",\"wwuasnjeglht\",\"xbozpcjcnwjz\"],\"metadata\":{\"i\":\"lxrnwvdsvo\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1110084417,\"maxAwaitDurationMs\":1952109965}},\"id\":\"gfhjxsawoo\",\"name\":\"uffhxf\",\"type\":\"kmwzrdqyoy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSubscription response = manager.daprSubscriptions() - .define("aoy") - .withExistingManagedEnvironment("n", "dv") - .withPubsubName("vg") - .withTopic("zmxynofxlt") - .withDeadLetterTopic("oqxt") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("sjirkrpskcjhmmof").withPath("ivd"), - new DaprSubscriptionRouteRule().withMatch("kykpaxnls").withPath("nyscaccpt"), - new DaprSubscriptionRouteRule().withMatch("et").withPath("gxxiceecv"), - new DaprSubscriptionRouteRule().withMatch("yuveoxmpz").withPath("ahdr"))) - .withDefaultProperty("haz")) - .withScopes(Arrays.asList("bivzfgxmbry")) - .withMetadata(mapOf("iqsykqfdqwdrt", "ibio", "ert", "tfdaglmrcokz")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(1522861626) - .withMaxAwaitDurationMs(1174388584)) - .create(); - - Assertions.assertEquals("dlkhczygpm", response.pubsubName()); - Assertions.assertEquals("jculojhhylx", response.topic()); - Assertions.assertEquals("vfiyymot", response.deadLetterTopic()); - Assertions.assertEquals("wjmtftcvelniru", response.routes().rules().get(0).match()); - Assertions.assertEquals("qnstpaqpibjg", response.routes().rules().get(0).path()); - Assertions.assertEquals("yufxuzmsvzyq", response.routes().defaultProperty()); - Assertions.assertEquals("nxhjtlxfikjk", response.scopes().get(0)); - Assertions.assertEquals("lxrnwvdsvo", response.metadata().get("i")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(1110084417, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1952109965, response.bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java deleted file mode 100644 index 8f7112987ded6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprSubscriptionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.daprSubscriptions().deleteWithResponse("u", "wvpu", "fddtbfmekjcng", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 05053a0e0109b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"pubsubName\":\"gtxdhmfppinmg\",\"topic\":\"esmkwtzgf\",\"deadLetterTopic\":\"gjhxerxl\",\"routes\":{\"rules\":[{\"match\":\"tqhvmmniiqyholhj\",\"path\":\"kb\"},{\"match\":\"icnq\",\"path\":\"ct\"},{\"match\":\"pblxkrkqgvxrkt\",\"path\":\"jigcwtspanb\"}],\"default\":\"asevc\"},\"scopes\":[\"p\"],\"metadata\":{\"ybruhola\":\"d\",\"lonbzaowcahdkmb\":\"mwcgimmrimaabsq\",\"glkvbgukbsv\":\"smihrijezbfsjwfc\",\"ygnbknhjgclxaxwc\":\"wyo\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1452046394,\"maxAwaitDurationMs\":2032469123}},\"id\":\"ucszgh\",\"name\":\"oaqipmnxclfrs\",\"type\":\"zrn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSubscription response = manager.daprSubscriptions() - .getWithResponse("pfixoskkzd", "iv", "ujybsrwz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gtxdhmfppinmg", response.pubsubName()); - Assertions.assertEquals("esmkwtzgf", response.topic()); - Assertions.assertEquals("gjhxerxl", response.deadLetterTopic()); - Assertions.assertEquals("tqhvmmniiqyholhj", response.routes().rules().get(0).match()); - Assertions.assertEquals("kb", response.routes().rules().get(0).path()); - Assertions.assertEquals("asevc", response.routes().defaultProperty()); - Assertions.assertEquals("p", response.scopes().get(0)); - Assertions.assertEquals("d", response.metadata().get("ybruhola")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(1452046394, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(2032469123, response.bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java deleted file mode 100644 index ed393984dc779..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"pubsubName\":\"gxzduvxdmxe\",\"topic\":\"tmdm\",\"deadLetterTopic\":\"senxoirxyd\",\"routes\":{\"rules\":[{\"match\":\"oi\",\"path\":\"kzsoxz\"},{\"match\":\"twg\",\"path\":\"yohpsapzupzwwytb\"},{\"match\":\"zghximkgfmx\",\"path\":\"kjnpyriwntot\"}],\"default\":\"mmqmtsjkyj\"},\"scopes\":[\"wdonbexftedaubh\",\"eggzgrn\",\"tlfozuumrtgjqgac\",\"ntns\"],\"metadata\":{\"te\":\"xjmkanbclazofmex\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1407174157,\"maxAwaitDurationMs\":238054598}},\"id\":\"scd\",\"name\":\"xwdpwjcbhaahntof\",\"type\":\"lf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.daprSubscriptions().list("livwehsud", "mymbhdosmbng", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gxzduvxdmxe", response.iterator().next().pubsubName()); - Assertions.assertEquals("tmdm", response.iterator().next().topic()); - Assertions.assertEquals("senxoirxyd", response.iterator().next().deadLetterTopic()); - Assertions.assertEquals("oi", response.iterator().next().routes().rules().get(0).match()); - Assertions.assertEquals("kzsoxz", response.iterator().next().routes().rules().get(0).path()); - Assertions.assertEquals("mmqmtsjkyj", response.iterator().next().routes().defaultProperty()); - Assertions.assertEquals("wdonbexftedaubh", response.iterator().next().scopes().get(0)); - Assertions.assertEquals("xjmkanbclazofmex", response.iterator().next().metadata().get("te")); - Assertions.assertEquals(false, response.iterator().next().bulkSubscribe().enabled()); - Assertions.assertEquals(1407174157, response.iterator().next().bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(238054598, response.iterator().next().bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 1def27ae388cb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.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.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; - -public final class DaprTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dapr model = BinaryData.fromString( - "{\"enabled\":true,\"appId\":\"ltiugcxnavv\",\"appProtocol\":\"http\",\"appPort\":1911413053,\"httpReadBufferSize\":1077177476,\"httpMaxRequestSize\":1643458041,\"logLevel\":\"info\",\"enableApiLogging\":false}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ltiugcxnavv", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(1911413053, model.appPort()); - Assertions.assertEquals(1077177476, model.httpReadBufferSize()); - Assertions.assertEquals(1643458041, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = new Dapr().withEnabled(true) - .withAppId("ltiugcxnavv") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(1911413053) - .withHttpReadBufferSize(1077177476) - .withHttpMaxRequestSize(1643458041) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(false); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ltiugcxnavv", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(1911413053, model.appPort()); - Assertions.assertEquals(1077177476, model.httpReadBufferSize()); - Assertions.assertEquals(1643458041, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java deleted file mode 100644 index 4c1a5c07ab929..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.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.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultAuthorizationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultAuthorizationPolicy model = BinaryData.fromString( - "{\"allowedPrincipals\":{\"groups\":[\"pbtoqcjmkl\",\"a\",\"bqidtqaj\"],\"identities\":[\"l\",\"kudjkrlkhb\",\"hfepgzgqex\"]},\"allowedApplications\":[\"c\",\"scpai\",\"rhhbcs\",\"l\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("pbtoqcjmkl", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("l", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("c", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model = new DefaultAuthorizationPolicy() - .withAllowedPrincipals(new AllowedPrincipals().withGroups(Arrays.asList("pbtoqcjmkl", "a", "bqidtqaj")) - .withIdentities(Arrays.asList("l", "kudjkrlkhb", "hfepgzgqex"))) - .withAllowedApplications(Arrays.asList("c", "scpai", "rhhbcs", "l")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("pbtoqcjmkl", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("l", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("c", model.allowedApplications().get(0)); - } -} 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 bf17d8fa17a35..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = BinaryData.fromString("{\"name\":\"tnpqmemczjk\",\"value\":\"ykyujxsg\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("tnpqmemczjk", model.name()); - Assertions.assertEquals("ykyujxsg", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = new DiagnosticDataProviderMetadataPropertyBagItem().withName("tnpqmemczjk").withValue("ykyujxsg"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("tnpqmemczjk", model.name()); - Assertions.assertEquals("ykyujxsg", 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 f437eb11d05a8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadata model = BinaryData.fromString( - "{\"providerName\":\"lpjrtwsz\",\"propertyBag\":[{\"name\":\"icphvtrrmhw\",\"value\":\"fdpyflubh\"},{\"name\":\"glrocuy\",\"value\":\"whhmemhooc\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("lpjrtwsz", model.providerName()); - Assertions.assertEquals("icphvtrrmhw", model.propertyBag().get(0).name()); - Assertions.assertEquals("fdpyflubh", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = new DiagnosticDataProviderMetadata().withProviderName("lpjrtwsz") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("icphvtrrmhw").withValue("fdpyflubh"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("glrocuy").withValue("whhmemhooc"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("lpjrtwsz", model.providerName()); - Assertions.assertEquals("icphvtrrmhw", model.propertyBag().get(0).name()); - Assertions.assertEquals("fdpyflubh", 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 1c0cef5ce855e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.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.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseColumnTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseColumn model - = BinaryData.fromString("{\"columnName\":\"bvopwndyqle\",\"dataType\":\"lklmtkhlo\",\"columnType\":\"x\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("bvopwndyqle", model.columnName()); - Assertions.assertEquals("lklmtkhlo", model.dataType()); - Assertions.assertEquals("x", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = new DiagnosticDataTableResponseColumn().withColumnName("bvopwndyqle") - .withDataType("lklmtkhlo") - .withColumnType("x"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("bvopwndyqle", model.columnName()); - Assertions.assertEquals("lklmtkhlo", model.dataType()); - Assertions.assertEquals("x", 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 409c0a133fb3d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseObject model = BinaryData.fromString( - "{\"tableName\":\"xuqibsxtkcudf\",\"columns\":[{\"columnName\":\"rfsiowlkjxn\",\"dataType\":\"vwgf\",\"columnType\":\"mhqykizmdksa\"},{\"columnName\":\"fcluqvo\",\"dataType\":\"ycjimryvwgcwwpbm\",\"columnType\":\"w\"}],\"rows\":[\"datadsxwefoh\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xuqibsxtkcudf", model.tableName()); - Assertions.assertEquals("rfsiowlkjxn", model.columns().get(0).columnName()); - Assertions.assertEquals("vwgf", model.columns().get(0).dataType()); - Assertions.assertEquals("mhqykizmdksa", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = new DiagnosticDataTableResponseObject().withTableName("xuqibsxtkcudf") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("rfsiowlkjxn") - .withDataType("vwgf") - .withColumnType("mhqykizmdksa"), - new DiagnosticDataTableResponseColumn().withColumnName("fcluqvo") - .withDataType("ycjimryvwgcwwpbm") - .withColumnType("w"))) - .withRows(Arrays.asList("datadsxwefoh")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xuqibsxtkcudf", model.tableName()); - Assertions.assertEquals("rfsiowlkjxn", model.columns().get(0).columnName()); - Assertions.assertEquals("vwgf", model.columns().get(0).dataType()); - Assertions.assertEquals("mhqykizmdksa", 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 271b099cdd4c8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.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.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticRenderingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticRendering model = BinaryData - .fromString("{\"type\":1451303679,\"title\":\"rdfjmzsyzfhotl\",\"description\":\"k\",\"isVisible\":true}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(1451303679, model.type()); - Assertions.assertEquals("rdfjmzsyzfhotl", model.title()); - Assertions.assertEquals("k", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = new DiagnosticRendering().withType(1451303679) - .withTitle("rdfjmzsyzfhotl") - .withDescription("k") - .withIsVisible(true); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(1451303679, model.type()); - Assertions.assertEquals("rdfjmzsyzfhotl", model.title()); - Assertions.assertEquals("k", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index 040a7fbc41f5e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = BinaryData.fromString("{\"id\":\"tfgxqbawpcb\",\"pesId\":\"zqcyknap\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticSupportTopic model = new DiagnosticSupportTopic(); - model = BinaryData.fromObject(model).toObject(DiagnosticSupportTopic.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java deleted file mode 100644 index f8f078f239d81..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"kifmjn\",\"name\":\"wtqabpxuckp\",\"description\":\"qoweyirdhl\",\"author\":\"ngwflqqmpizruwn\",\"category\":\"xpxiwfcngjs\",\"supportTopicList\":[{}],\"analysisTypes\":[\"xtmkzjvkviir\",\"gfgrwsdp\",\"ra\",\"zvzbglbyv\"],\"type\":\"tctbrxkjzwrgxffm\",\"score\":41.11345},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"bydpizqaclnapxb\",\"statusId\":504122160},\"dataProviderMetadata\":{\"providerName\":\"gjkn\",\"propertyBag\":[{},{}]}},\"id\":\"cttuxuu\",\"name\":\"i\",\"type\":\"flqo\"},{\"properties\":{\"metadata\":{\"id\":\"rehmr\",\"name\":\"hvsujztc\",\"description\":\"tqjtwhauu\",\"author\":\"prnjletlxsmr\",\"category\":\"do\",\"supportTopicList\":[{}],\"analysisTypes\":[\"owa\",\"iynknlq\",\"zdvpiw\",\"xqszdtmaajquh\"],\"type\":\"ylr\",\"score\":3.5013914},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"p\",\"statusId\":26175151},\"dataProviderMetadata\":{\"providerName\":\"kyjpmspbps\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"pyogtieyuj\",\"name\":\"vczkcnyxrxmunjd\",\"type\":\"vg\"},{\"properties\":{\"metadata\":{\"id\":\"xl\",\"name\":\"aglqivbgkcvkh\",\"description\":\"vuqd\",\"author\":\"voniypfp\",\"category\":\"cpzgpxtiv\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"dibgqjxgpnrhgov\",\"gpikqmh\",\"ao\"],\"type\":\"rmzvupo\",\"score\":95.10622},\"dataset\":[{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"vkfvxcnqmxqpswok\",\"statusId\":1070878319},\"dataProviderMetadata\":{\"providerName\":\"ggdhbemzqkzszuw\",\"propertyBag\":[{},{}]}},\"id\":\"lxxhljfp\",\"name\":\"picrmnzhrgmqgjsx\",\"type\":\"pqcbfrmbodthsq\"},{\"properties\":{\"metadata\":{\"id\":\"iibakcl\",\"name\":\"jfrnxousxauzlwv\",\"description\":\"mwohqfzizvuxmmkj\",\"author\":\"thnwpzte\",\"category\":\"vmribiat\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"cfotangcfhnykzcu\",\"swvxwlmzqwmv\",\"xnjmxm\"],\"type\":\"qudtcvclx\",\"score\":26.504374},\"dataset\":[{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"buiyji\",\"statusId\":850664792},\"dataProviderMetadata\":{\"providerName\":\"dugneiknp\",\"propertyBag\":[{},{}]}},\"id\":\"jiuqhibtozi\",\"name\":\"qw\",\"type\":\"edmurrxxge\"}],\"nextLink\":\"ktvqylkmqpzoy\"}") - .toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("xtmkzjvkviir", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("bydpizqaclnapxb", model.value().get(0).properties().status().message()); - Assertions.assertEquals(504122160, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("gjkn", model.value().get(0).properties().dataProviderMetadata().providerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsCollectionInner model = new DiagnosticsCollectionInner().withValue(Arrays.asList( - new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xtmkzjvkviir", "gfgrwsdp", "ra", "zvzbglbyv"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("bydpizqaclnapxb").withStatusId(504122160)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("gjkn") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("owa", "iynknlq", "zdvpiw", "xqszdtmaajquh"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("p").withStatusId(26175151)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("kyjpmspbps") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("dibgqjxgpnrhgov", "gpikqmh", "ao"))) - .withDataset(Arrays - .asList(new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("vkfvxcnqmxqpswok").withStatusId(1070878319)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata() - .withProviderName("ggdhbemzqkzszuw") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic(), - new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("cfotangcfhnykzcu", "swvxwlmzqwmv", "xnjmxm"))) - .withDataset( - Arrays.asList(new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("buiyji").withStatusId(850664792)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("dugneiknp") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("xtmkzjvkviir", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("bydpizqaclnapxb", model.value().get(0).properties().status().message()); - Assertions.assertEquals(504122160, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("gjkn", model.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index dac0f6e4e67f7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDataApiResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDataApiResponse model = BinaryData.fromString( - "{\"table\":{\"tableName\":\"yuicdhzbdy\",\"columns\":[{\"columnName\":\"bdvibidmhmwffpl\",\"dataType\":\"u\",\"columnType\":\"pckc\"},{\"columnName\":\"rv\",\"dataType\":\"yoxoy\",\"columnType\":\"k\"},{\"columnName\":\"aimmoiroqb\",\"dataType\":\"hbragapyyr\",\"columnType\":\"svbpavbopfppdbwn\"},{\"columnName\":\"gahxkumasjcaa\",\"dataType\":\"dmmcpugmehqep\",\"columnType\":\"fhbzehewhoqhn\"}],\"rows\":[\"datanbldxeaclgschori\",\"datakrsrrmoucs\"]},\"renderingProperties\":{\"type\":1831822639,\"title\":\"uviyfcaabeo\",\"description\":\"bh\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("yuicdhzbdy", model.table().tableName()); - Assertions.assertEquals("bdvibidmhmwffpl", model.table().columns().get(0).columnName()); - Assertions.assertEquals("u", model.table().columns().get(0).dataType()); - Assertions.assertEquals("pckc", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1831822639, model.renderingProperties().type()); - Assertions.assertEquals("uviyfcaabeo", model.renderingProperties().title()); - Assertions.assertEquals("bh", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDataApiResponse model = new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("yuicdhzbdy") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("bdvibidmhmwffpl") - .withDataType("u") - .withColumnType("pckc"), - new DiagnosticDataTableResponseColumn().withColumnName("rv") - .withDataType("yoxoy") - .withColumnType("k"), - new DiagnosticDataTableResponseColumn().withColumnName("aimmoiroqb") - .withDataType("hbragapyyr") - .withColumnType("svbpavbopfppdbwn"), - new DiagnosticDataTableResponseColumn().withColumnName("gahxkumasjcaa") - .withDataType("dmmcpugmehqep") - .withColumnType("fhbzehewhoqhn"))) - .withRows(Arrays.asList("datanbldxeaclgschori", "datakrsrrmoucs"))) - .withRenderingProperties(new DiagnosticRendering().withType(1831822639) - .withTitle("uviyfcaabeo") - .withDescription("bh") - .withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("yuicdhzbdy", model.table().tableName()); - Assertions.assertEquals("bdvibidmhmwffpl", model.table().columns().get(0).columnName()); - Assertions.assertEquals("u", model.table().columns().get(0).dataType()); - Assertions.assertEquals("pckc", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1831822639, model.renderingProperties().type()); - Assertions.assertEquals("uviyfcaabeo", model.renderingProperties().title()); - Assertions.assertEquals("bh", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java deleted file mode 100644 index 46a0442c6671a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDefinition model = BinaryData.fromString( - "{\"id\":\"ddm\",\"name\":\"huytxzvtzn\",\"description\":\"xbannovvoxc\",\"author\":\"tprwnw\",\"category\":\"oevytlyokr\",\"supportTopicList\":[{\"id\":\"uxvnsasbcrymodi\",\"pesId\":\"xkl\"}],\"analysisTypes\":[\"xnazpmkml\"],\"type\":\"evfxzopjhbzxlioh\",\"score\":9.690398}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("xnazpmkml", model.analysisTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDefinition model - = new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xnazpmkml")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("xnazpmkml", 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 ad07a2ee1e174..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsInner model = BinaryData.fromString( - "{\"properties\":{\"metadata\":{\"id\":\"cgwgcloxoebqinji\",\"name\":\"wjfuj\",\"description\":\"afcba\",\"author\":\"pzpofoiyjw\",\"category\":\"ilkmk\",\"supportTopicList\":[{\"id\":\"vdndviauo\",\"pesId\":\"huartv\"},{\"id\":\"ukyefchnmnahmnxh\",\"pesId\":\"jqirwrw\"}],\"analysisTypes\":[\"xffi\",\"hx\"],\"type\":\"snewmozqvbub\",\"score\":81.654564},\"dataset\":[{\"table\":{\"tableName\":\"cx\",\"columns\":[{}],\"rows\":[\"datazttaboidvmf\",\"datahppubowsepdfgkmt\",\"dataherngb\",\"datac\"]},\"renderingProperties\":{\"type\":812344780,\"title\":\"kqtob\",\"description\":\"uxofshfphwpnulai\",\"isVisible\":true}},{\"table\":{\"tableName\":\"ywhslwkojpllndnp\",\"columns\":[{},{}],\"rows\":[\"dataafgfugsnn\",\"datahyet\",\"datafypococtfjgti\",\"datarjvzuyt\"]},\"renderingProperties\":{\"type\":1360541233,\"title\":\"uowolbauiropi\",\"description\":\"szonwpngajinn\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rtmjfj\",\"columns\":[{},{},{},{}],\"rows\":[\"datalzhcoxovnekh\",\"datanlusfnrd\",\"datajxtxrdc\",\"datatjvidt\"]},\"renderingProperties\":{\"type\":1839935404,\"title\":\"slvyjtcvuwkasi\",\"description\":\"esfuught\",\"isVisible\":true}}],\"status\":{\"message\":\"jxeygtuhxu\",\"statusId\":1045251485},\"dataProviderMetadata\":{\"providerName\":\"wmrswnjlxuzrh\",\"propertyBag\":[{\"name\":\"xjbaqehgpdohzjq\",\"value\":\"ucoig\"},{\"name\":\"xncnwfe\",\"value\":\"nwgfmxjgcgbjbgd\"},{\"name\":\"gtdysnaqu\",\"value\":\"qbctqha\"}]}},\"id\":\"jrwdkqz\",\"name\":\"qy\",\"type\":\"leziunjxdfzant\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("xffi", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("cx", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(812344780, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("kqtob", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("uxofshfphwpnulai", - model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jxeygtuhxu", model.properties().status().message()); - Assertions.assertEquals(1045251485, model.properties().status().statusId()); - Assertions.assertEquals("wmrswnjlxuzrh", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("xjbaqehgpdohzjq", - model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ucoig", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsInner model - = new DiagnosticsInner() - .withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xffi", "hx"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject().withTableName("cx") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datazttaboidvmf", "datahppubowsepdfgkmt", "dataherngb", - "datac"))) - .withRenderingProperties(new DiagnosticRendering() - .withType(812344780) - .withTitle("kqtob") - .withDescription("uxofshfphwpnulai") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("ywhslwkojpllndnp") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows( - Arrays.asList("dataafgfugsnn", "datahyet", "datafypococtfjgti", "datarjvzuyt"))) - .withRenderingProperties( - new DiagnosticRendering().withType(1360541233) - .withTitle("uowolbauiropi") - .withDescription("szonwpngajinn") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("rtmjfj") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows( - Arrays.asList("datalzhcoxovnekh", "datanlusfnrd", "datajxtxrdc", "datatjvidt"))) - .withRenderingProperties(new DiagnosticRendering().withType(1839935404) - .withTitle("slvyjtcvuwkasi") - .withDescription("esfuught") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("jxeygtuhxu").withStatusId(1045251485)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("wmrswnjlxuzrh") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("xjbaqehgpdohzjq") - .withValue("ucoig"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("xncnwfe") - .withValue("nwgfmxjgcgbjbgd"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("gtdysnaqu") - .withValue("qbctqha"))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("xffi", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("cx", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(812344780, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("kqtob", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("uxofshfphwpnulai", - model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jxeygtuhxu", model.properties().status().message()); - Assertions.assertEquals(1045251485, model.properties().status().statusId()); - Assertions.assertEquals("wmrswnjlxuzrh", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("xjbaqehgpdohzjq", - model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ucoig", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index 6b17742f00b91..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsProperties model = BinaryData.fromString( - "{\"metadata\":{\"id\":\"eg\",\"name\":\"mlbnseq\",\"description\":\"jjvpilguooqja\",\"author\":\"d\",\"category\":\"gueiookjbsahrtdt\",\"supportTopicList\":[{\"id\":\"qacsl\",\"pesId\":\"toebnf\"},{\"id\":\"f\",\"pesId\":\"jkgd\"},{\"id\":\"azftxejwabmdujtm\",\"pesId\":\"op\"}],\"analysisTypes\":[\"m\"],\"type\":\"rbuhhlky\",\"score\":71.514824},\"dataset\":[{\"table\":{\"tableName\":\"gtuwkff\",\"columns\":[{\"columnName\":\"sysidfvclglxnf\",\"dataType\":\"jtkbusqogsfika\",\"columnType\":\"ansharujtjiqxfz\"},{\"columnName\":\"qttv\",\"dataType\":\"pqhjpenuygbqeqq\",\"columnType\":\"ewvnqvcdlgu\"},{\"columnName\":\"cmfdjwnlax\",\"dataType\":\"njqikcz\",\"columnType\":\"itacgxmfcsserx\"},{\"columnName\":\"vs\",\"dataType\":\"hlwntsjgq\",\"columnType\":\"xypruuuy\"}],\"rows\":[\"datahrszi\",\"dataoyuelyetn\"]},\"renderingProperties\":{\"type\":1833939931,\"title\":\"yggagflnlgmt\",\"description\":\"ahzjmucftb\",\"isVisible\":true}},{\"table\":{\"tableName\":\"ohkpigqfu\",\"columns\":[{\"columnName\":\"zmkw\",\"dataType\":\"snoxaxmqeqa\",\"columnType\":\"hjnhgwydyynfsvk\"},{\"columnName\":\"bvqt\",\"dataType\":\"arfdlpukhpyrnei\",\"columnType\":\"cpeogkhnmgbrou\"},{\"columnName\":\"dbhfhp\",\"dataType\":\"azjzo\",\"columnType\":\"jxhpdulontacn\"}],\"rows\":[\"datatehtuevrhrljyoog\"]},\"renderingProperties\":{\"type\":705670671,\"title\":\"duugwbsre\",\"description\":\"fqkfuarenl\",\"isVisible\":false}}],\"status\":{\"message\":\"lnvnafvvkyfedev\",\"statusId\":972204015},\"dataProviderMetadata\":{\"providerName\":\"cqxypokkhminq\",\"propertyBag\":[{\"name\":\"zng\",\"value\":\"dxxewuninv\"},{\"name\":\"bchaqd\",\"value\":\"qecrqctmxx\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("m", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("gtuwkff", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("sysidfvclglxnf", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("jtkbusqogsfika", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("ansharujtjiqxfz", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1833939931, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("yggagflnlgmt", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("ahzjmucftb", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("lnvnafvvkyfedev", model.status().message()); - Assertions.assertEquals(972204015, model.status().statusId()); - Assertions.assertEquals("cqxypokkhminq", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("zng", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("dxxewuninv", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsProperties model = new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic(), - new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("m"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("gtuwkff") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("sysidfvclglxnf") - .withDataType("jtkbusqogsfika") - .withColumnType("ansharujtjiqxfz"), - new DiagnosticDataTableResponseColumn().withColumnName("qttv") - .withDataType("pqhjpenuygbqeqq") - .withColumnType("ewvnqvcdlgu"), - new DiagnosticDataTableResponseColumn().withColumnName("cmfdjwnlax") - .withDataType("njqikcz") - .withColumnType("itacgxmfcsserx"), - new DiagnosticDataTableResponseColumn().withColumnName("vs") - .withDataType("hlwntsjgq") - .withColumnType("xypruuuy"))) - .withRows(Arrays.asList("datahrszi", "dataoyuelyetn"))) - .withRenderingProperties(new DiagnosticRendering().withType(1833939931) - .withTitle("yggagflnlgmt") - .withDescription("ahzjmucftb") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("ohkpigqfu") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("zmkw") - .withDataType("snoxaxmqeqa") - .withColumnType("hjnhgwydyynfsvk"), - new DiagnosticDataTableResponseColumn().withColumnName("bvqt") - .withDataType("arfdlpukhpyrnei") - .withColumnType("cpeogkhnmgbrou"), - new DiagnosticDataTableResponseColumn().withColumnName("dbhfhp") - .withDataType("azjzo") - .withColumnType("jxhpdulontacn"))) - .withRows(Arrays.asList("datatehtuevrhrljyoog"))) - .withRenderingProperties(new DiagnosticRendering().withType(705670671) - .withTitle("duugwbsre") - .withDescription("fqkfuarenl") - .withIsVisible(false)))) - .withStatus(new DiagnosticsStatus().withMessage("lnvnafvvkyfedev").withStatusId(972204015)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("cqxypokkhminq") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("zng").withValue("dxxewuninv"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("bchaqd").withValue("qecrqctmxx")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("m", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("gtuwkff", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("sysidfvclglxnf", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("jtkbusqogsfika", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("ansharujtjiqxfz", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1833939931, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("yggagflnlgmt", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("ahzjmucftb", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("lnvnafvvkyfedev", model.status().message()); - Assertions.assertEquals(972204015, model.status().statusId()); - Assertions.assertEquals("cqxypokkhminq", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("zng", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("dxxewuninv", 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 79840cc61edc0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsStatus model - = BinaryData.fromString("{\"message\":\"h\",\"statusId\":963815011}").toObject(DiagnosticsStatus.class); - Assertions.assertEquals("h", model.message()); - Assertions.assertEquals(963815011, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("h").withStatusId(963815011); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("h", model.message()); - Assertions.assertEquals(963815011, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java deleted file mode 100644 index ee22a42a2e342..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"vcrrpcj\",\"value\":\"bstvje\"}") - .toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("vcrrpcj", model.propertyName()); - Assertions.assertEquals("bstvje", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentConfigurationProperty model - = new DotNetComponentConfigurationProperty().withPropertyName("vcrrpcj").withValue("bstvje"); - model = BinaryData.fromObject(model).toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("vcrrpcj", model.propertyName()); - Assertions.assertEquals("bstvje", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java deleted file mode 100644 index 3ee90151a6f38..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"dzbenri\",\"value\":\"awetzq\"}],\"serviceBinds\":[{\"name\":\"wflj\",\"serviceId\":\"namtuatmzw\"},{\"name\":\"jncqtjzmi\",\"serviceId\":\"gbgatzuuvbxn\"},{\"name\":\"ebwgga\",\"serviceId\":\"tzlswvaj\"},{\"name\":\"utlxjoqzasunwqrj\",\"serviceId\":\"rg\"}]},\"id\":\"aohcmbuocn\",\"name\":\"r\",\"type\":\"hmbpyryxamebly\"}") - .toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("dzbenri", model.configurations().get(0).propertyName()); - Assertions.assertEquals("awetzq", model.configurations().get(0).value()); - Assertions.assertEquals("wflj", model.serviceBinds().get(0).name()); - Assertions.assertEquals("namtuatmzw", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentInner model = new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays - .asList(new DotNetComponentConfigurationProperty().withPropertyName("dzbenri").withValue("awetzq"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("wflj").withServiceId("namtuatmzw"), - new DotNetComponentServiceBind().withName("jncqtjzmi").withServiceId("gbgatzuuvbxn"), - new DotNetComponentServiceBind().withName("ebwgga").withServiceId("tzlswvaj"), - new DotNetComponentServiceBind().withName("utlxjoqzasunwqrj").withServiceId("rg"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("dzbenri", model.configurations().get(0).propertyName()); - Assertions.assertEquals("awetzq", model.configurations().get(0).value()); - Assertions.assertEquals("wflj", model.serviceBinds().get(0).name()); - Assertions.assertEquals("namtuatmzw", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java deleted file mode 100644 index 9ce139cef219a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"ocxnehvsmtodl\",\"value\":\"yapucygvoa\"}],\"serviceBinds\":[{\"name\":\"ssxlghieegjlg\",\"serviceId\":\"paseksgb\"},{\"name\":\"antuygdhgaqipirp\",\"serviceId\":\"rqofulopmjnlexwh\"},{\"name\":\"jpib\",\"serviceId\":\"phuuuerctato\"},{\"name\":\"ntqpbr\",\"serviceId\":\"yrduczkgofxyfsr\"}]}") - .toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("ocxnehvsmtodl", model.configurations().get(0).propertyName()); - Assertions.assertEquals("yapucygvoa", model.configurations().get(0).value()); - Assertions.assertEquals("ssxlghieegjlg", model.serviceBinds().get(0).name()); - Assertions.assertEquals("paseksgb", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentProperties model = new DotNetComponentProperties() - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("ocxnehvsmtodl").withValue("yapucygvoa"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("ssxlghieegjlg").withServiceId("paseksgb"), - new DotNetComponentServiceBind().withName("antuygdhgaqipirp").withServiceId("rqofulopmjnlexwh"), - new DotNetComponentServiceBind().withName("jpib").withServiceId("phuuuerctato"), - new DotNetComponentServiceBind().withName("ntqpbr").withServiceId("yrduczkgofxyfsr"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("ocxnehvsmtodl", model.configurations().get(0).propertyName()); - Assertions.assertEquals("yapucygvoa", model.configurations().get(0).value()); - Assertions.assertEquals("ssxlghieegjlg", model.serviceBinds().get(0).name()); - Assertions.assertEquals("paseksgb", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java deleted file mode 100644 index d199f64128861..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.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.DotNetComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentServiceBind model - = BinaryData.fromString("{\"name\":\"nrmvvfkoxmlghk\",\"serviceId\":\"idvrmaz\"}") - .toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("nrmvvfkoxmlghk", model.name()); - Assertions.assertEquals("idvrmaz", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentServiceBind model - = new DotNetComponentServiceBind().withName("nrmvvfkoxmlghk").withServiceId("idvrmaz"); - model = BinaryData.fromObject(model).toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("nrmvvfkoxmlghk", model.name()); - Assertions.assertEquals("idvrmaz", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java deleted file mode 100644 index e36a36260507c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qedikdfrd\",\"value\":\"qmrjg\"},{\"propertyName\":\"hfqlgg\",\"value\":\"iwzcxmjpbyeph\"},{\"propertyName\":\"t\",\"value\":\"j\"}],\"serviceBinds\":[{\"name\":\"yfqi\",\"serviceId\":\"xhnpo\"},{\"name\":\"qwcabvnui\",\"serviceId\":\"ey\"},{\"name\":\"wlpaugmrmfjlrxwt\",\"serviceId\":\"ukhfkvc\"},{\"name\":\"izmoaeds\",\"serviceId\":\"wuived\"}]},\"id\":\"gyeewxeiq\",\"name\":\"psmgo\",\"type\":\"guamlj\"},{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"gaufcs\",\"value\":\"vnewgnxkympqanx\"},{\"propertyName\":\"kixtwbtaoy\",\"value\":\"yghs\"},{\"propertyName\":\"cyl\",\"value\":\"gmnsghpxy\"},{\"propertyName\":\"hdrwjjkh\",\"value\":\"omacluzvxnqmhr\"}],\"serviceBinds\":[{\"name\":\"fwmkoisqcssffxui\",\"serviceId\":\"csypobkdqzrdzsyl\"}]},\"id\":\"lgtrczzy\",\"name\":\"mxzjijpvua\",\"type\":\"rkihcirld\"},{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"b\",\"value\":\"ja\"},{\"propertyName\":\"rnnqb\",\"value\":\"bpizxqltgr\"}],\"serviceBinds\":[{\"name\":\"pxrxvbfihwu\",\"serviceId\":\"ctafsrbxrblm\"},{\"name\":\"owxih\",\"serviceId\":\"nxw\"},{\"name\":\"gnepz\",\"serviceId\":\"klsbsbqqqagw\"},{\"name\":\"xaomzisglrrc\",\"serviceId\":\"zkhhltnjadhqo\"}]},\"id\":\"jqoyueayfbpcm\",\"name\":\"plby\",\"type\":\"rueqthwm\"},{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"igdhxiidlo\",\"value\":\"dbwdpyqyybxubmdn\"},{\"propertyName\":\"cbq\",\"value\":\"e\"},{\"propertyName\":\"ela\",\"value\":\"cigeleohdbvqvw\"}],\"serviceBinds\":[{\"name\":\"pwbeonr\",\"serviceId\":\"wzdqybxceakxcpts\"},{\"name\":\"fyiaseqch\",\"serviceId\":\"ttzrazisgyki\"},{\"name\":\"mvanbwzo\",\"serviceId\":\"nrxxbsojklin\"},{\"name\":\"dptysprqs\",\"serviceId\":\"zxojpslsv\"}]},\"id\":\"pli\",\"name\":\"fiqwoy\",\"type\":\"qvapcohhoucq\"}],\"nextLink\":\"oj\"}") - .toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("qedikdfrd", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("qmrjg", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("yfqi", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("xhnpo", model.value().get(0).serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentsCollection model - = new DotNetComponentsCollection().withValue(Arrays.asList( - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("qedikdfrd").withValue("qmrjg"), - new DotNetComponentConfigurationProperty().withPropertyName("hfqlgg") - .withValue("iwzcxmjpbyeph"), - new DotNetComponentConfigurationProperty().withPropertyName("t").withValue("j"))) - .withServiceBinds(Arrays.asList( - new DotNetComponentServiceBind().withName("yfqi").withServiceId("xhnpo"), - new DotNetComponentServiceBind().withName("qwcabvnui").withServiceId("ey"), - new DotNetComponentServiceBind().withName("wlpaugmrmfjlrxwt").withServiceId("ukhfkvc"), - new DotNetComponentServiceBind().withName("izmoaeds").withServiceId("wuived"))), - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("gaufcs") - .withValue("vnewgnxkympqanx"), - new DotNetComponentConfigurationProperty().withPropertyName("kixtwbtaoy").withValue("yghs"), - new DotNetComponentConfigurationProperty().withPropertyName("cyl").withValue("gmnsghpxy"), - new DotNetComponentConfigurationProperty().withPropertyName("hdrwjjkh") - .withValue("omacluzvxnqmhr"))) - .withServiceBinds(Arrays - .asList(new DotNetComponentServiceBind().withName("fwmkoisqcssffxui") - .withServiceId("csypobkdqzrdzsyl"))), - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations( - Arrays.asList(new DotNetComponentConfigurationProperty().withPropertyName("b").withValue("ja"), - new DotNetComponentConfigurationProperty().withPropertyName("rnnqb") - .withValue("bpizxqltgr"))) - .withServiceBinds(Arrays.asList( - new DotNetComponentServiceBind().withName("pxrxvbfihwu").withServiceId("ctafsrbxrblm"), - new DotNetComponentServiceBind().withName("owxih").withServiceId("nxw"), - new DotNetComponentServiceBind().withName("gnepz").withServiceId("klsbsbqqqagw"), - new DotNetComponentServiceBind().withName("xaomzisglrrc").withServiceId("zkhhltnjadhqo"))), - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("igdhxiidlo") - .withValue("dbwdpyqyybxubmdn"), - new DotNetComponentConfigurationProperty().withPropertyName("cbq").withValue("e"), - new DotNetComponentConfigurationProperty().withPropertyName("ela").withValue("cigeleohdbvqvw"))) - .withServiceBinds(Arrays.asList( - new DotNetComponentServiceBind().withName("pwbeonr").withServiceId("wzdqybxceakxcpts"), - new DotNetComponentServiceBind().withName("fyiaseqch").withServiceId("ttzrazisgyki"), - new DotNetComponentServiceBind().withName("mvanbwzo").withServiceId("nrxxbsojklin"), - new DotNetComponentServiceBind().withName("dptysprqs").withServiceId("zxojpslsv"))))); - model = BinaryData.fromObject(model).toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("qedikdfrd", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("qmrjg", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("yfqi", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("xhnpo", model.value().get(0).serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index e4bc5938e301b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DotNetComponentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"zdqiqdlrat\",\"value\":\"wxoauwxsuy\"},{\"propertyName\":\"nhrfgslgl\",\"value\":\"ry\"},{\"propertyName\":\"zihuioaeo\",\"value\":\"ajtfey\"}],\"serviceBinds\":[{\"name\":\"gdd\",\"serviceId\":\"hdccxb\"},{\"name\":\"uqutkzwtjww\",\"serviceId\":\"zytijcx\"}]},\"id\":\"ondegjdydhqkkk\",\"name\":\"juck\",\"type\":\"a\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DotNetComponent response - = manager.dotNetComponents() - .define("ceeg") - .withExistingManagedEnvironment("ovyzt", "lnomfpb") - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("nji").withValue("ukkrehyh"), - new DotNetComponentConfigurationProperty().withPropertyName("joduifvulxfaryrv") - .withValue("gdezvjqwahoy"), - new DotNetComponentConfigurationProperty().withPropertyName("axqvjweiwtczkddn") - .withValue("vbooqbmdqrxy"), - new DotNetComponentConfigurationProperty().withPropertyName("ae").withValue("cflwtjdtlr"))) - .withServiceBinds(Arrays - .asList(new DotNetComponentServiceBind().withName("oyycuxdtz").withServiceId("ipsdudgcozzomehx"))) - .create(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.componentType()); - Assertions.assertEquals("zdqiqdlrat", response.configurations().get(0).propertyName()); - Assertions.assertEquals("wxoauwxsuy", response.configurations().get(0).value()); - Assertions.assertEquals("gdd", response.serviceBinds().get(0).name()); - Assertions.assertEquals("hdccxb", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java deleted file mode 100644 index adacbcf374c4c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DotNetComponentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"nqifb\",\"value\":\"troiauesugmo\"},{\"propertyName\":\"cjycb\",\"value\":\"lrgttwfldsiuor\"},{\"propertyName\":\"ikcedpk\",\"value\":\"iwm\"}],\"serviceBinds\":[{\"name\":\"rx\",\"serviceId\":\"qvvyczyay\"}]},\"id\":\"tg\",\"name\":\"bxiqahragpxmibpl\",\"type\":\"upoyryefqm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DotNetComponent response = manager.dotNetComponents() - .getWithResponse("qoq", "umov", "fbpbvzopaxmfmvsm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.componentType()); - Assertions.assertEquals("nqifb", response.configurations().get(0).propertyName()); - Assertions.assertEquals("troiauesugmo", response.configurations().get(0).value()); - Assertions.assertEquals("rx", response.serviceBinds().get(0).name()); - Assertions.assertEquals("qvvyczyay", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java deleted file mode 100644 index e5513afe5c849..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DotNetComponentsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"i\",\"value\":\"vfph\"},{\"propertyName\":\"zxplgtpvdvatlz\",\"value\":\"schnzrsbkkzov\"}],\"serviceBinds\":[{\"name\":\"nfmf\",\"serviceId\":\"xafofuworimmo\"},{\"name\":\"wdehk\",\"serviceId\":\"vh\"}]},\"id\":\"ovanyrva\",\"name\":\"rtgelg\",\"type\":\"ewikfyaqandmym\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.dotNetComponents().list("zmec", "yrzwim", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.iterator().next().componentType()); - Assertions.assertEquals("i", response.iterator().next().configurations().get(0).propertyName()); - Assertions.assertEquals("vfph", response.iterator().next().configurations().get(0).value()); - Assertions.assertEquals("nfmf", response.iterator().next().serviceBinds().get(0).name()); - Assertions.assertEquals("xafofuworimmo", response.iterator().next().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DynamicPoolConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DynamicPoolConfigurationTests.java deleted file mode 100644 index 8487edf4f75c2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DynamicPoolConfigurationTests.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.DynamicPoolConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExecutionType; -import org.junit.jupiter.api.Assertions; - -public final class DynamicPoolConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DynamicPoolConfiguration model - = BinaryData.fromString("{\"executionType\":\"Timed\",\"cooldownPeriodInSeconds\":746023712}") - .toObject(DynamicPoolConfiguration.class); - Assertions.assertEquals(ExecutionType.TIMED, model.executionType()); - Assertions.assertEquals(746023712, model.cooldownPeriodInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DynamicPoolConfiguration model = new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED) - .withCooldownPeriodInSeconds(746023712); - model = BinaryData.fromObject(model).toObject(DynamicPoolConfiguration.class); - Assertions.assertEquals(ExecutionType.TIMED, model.executionType()); - Assertions.assertEquals(746023712, model.cooldownPeriodInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java deleted file mode 100644 index 7e7c64b519505..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariable model - = BinaryData.fromString("{\"name\":\"bdagxt\",\"value\":\"bqdxbx\"}").toObject(EnvironmentVariable.class); - Assertions.assertEquals("bdagxt", model.name()); - Assertions.assertEquals("bqdxbx", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariable model = new EnvironmentVariable().withName("bdagxt").withValue("bqdxbx"); - model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); - Assertions.assertEquals("bdagxt", model.name()); - Assertions.assertEquals("bqdxbx", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index 00e76cbc1dada..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"wuoegrpk\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("wuoegrpk", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model - = new ExtendedLocation().withName("wuoegrpk").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("wuoegrpk", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java deleted file mode 100644 index 128be3fa547c8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.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.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; - -public final class ForwardProxyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForwardProxy model = BinaryData.fromString( - "{\"convention\":\"Custom\",\"customHostHeaderName\":\"umasxazjpq\",\"customProtoHeaderName\":\"gual\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("umasxazjpq", model.customHostHeaderName()); - Assertions.assertEquals("gual", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = new ForwardProxy().withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("umasxazjpq") - .withCustomProtoHeaderName("gual"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("umasxazjpq", model.customHostHeaderName()); - Assertions.assertEquals("gual", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.java deleted file mode 100644 index c1476a56cf87a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests { - @Test - public void testInvokeFunctionsHostWithResponse() throws Exception { - String responseStr = "\"rptvcshtkutzcttb\""; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - String response = manager.functionsExtensions() - .invokeFunctionsHostWithResponse("uqbhpowcnxtpzdly", "eidtoakatp", "ytgrhzbqfd", "fa", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rptvcshtkutzcttb", response); - } -} 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 17ce4d5cadf33..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.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.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GlobalValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GlobalValidation model = BinaryData.fromString( - "{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"s\",\"excludedPaths\":[\"bquxigjy\",\"gzjaoyfhrtxilne\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("s", model.redirectToProvider()); - Assertions.assertEquals("bquxigjy", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model - = new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("s") - .withExcludedPaths(Arrays.asList("bquxigjy", "gzjaoyfhrtxilne")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("s", model.redirectToProvider()); - Assertions.assertEquals("bquxigjy", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java deleted file mode 100644 index a50eb82e0d802..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.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.HeaderMatchMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatchMatch model = BinaryData.fromString( - "{\"exactMatch\":\"wjzrnfygxgisp\",\"prefixMatch\":\"vtz\",\"suffixMatch\":\"ufubl\",\"regexMatch\":\"fxqeof\"}") - .toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatchMatch model = new HeaderMatchMatch().withExactMatch("wjzrnfygxgisp") - .withPrefixMatch("vtz") - .withSuffixMatch("ufubl") - .withRegexMatch("fxqeof"); - model = BinaryData.fromObject(model).toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java deleted file mode 100644 index 47d423d7c17aa..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.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.HeaderMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatch model = BinaryData.fromString( - "{\"header\":\"uybbkpodep\",\"match\":{\"exactMatch\":\"inuvamiheogn\",\"prefixMatch\":\"xzxtheo\",\"suffixMatch\":\"si\",\"regexMatch\":\"evcciqihnhun\"}}") - .toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatch model = new HeaderMatch().withHeaderProperty("uybbkpodep") - .withExactMatch("inuvamiheogn") - .withPrefixMatch("xzxtheo") - .withSuffixMatch("si") - .withRegexMatch("evcciqihnhun"); - model = BinaryData.fromObject(model).toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java deleted file mode 100644 index 5662a4ebc19ca..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class HttpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpConnectionPool model - = BinaryData.fromString("{\"http1MaxPendingRequests\":5903092,\"http2MaxRequests\":1154409847}") - .toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpConnectionPool model - = new HttpConnectionPool().withHttp1MaxPendingRequests(5903092).withHttp2MaxRequests(1154409847); - model = BinaryData.fromObject(model).toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java deleted file mode 100644 index 117a9ffcc6c98..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.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.HttpGet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpGet model = BinaryData - .fromString("{\"url\":\"wzizxbmpgcjefuzm\",\"fileName\":\"pbttdum\",\"headers\":[\"pxebmnzbt\"]}") - .toObject(HttpGet.class); - Assertions.assertEquals("wzizxbmpgcjefuzm", model.url()); - Assertions.assertEquals("pbttdum", model.fileName()); - Assertions.assertEquals("pxebmnzbt", model.headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpGet model - = new HttpGet().withUrl("wzizxbmpgcjefuzm").withFileName("pbttdum").withHeaders(Arrays.asList("pxebmnzbt")); - model = BinaryData.fromObject(model).toObject(HttpGet.class); - Assertions.assertEquals("wzizxbmpgcjefuzm", model.url()); - Assertions.assertEquals("pbttdum", model.fileName()); - Assertions.assertEquals("pxebmnzbt", model.headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java deleted file mode 100644 index cbf79db3ef8e8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.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.HttpRetryPolicyRetryBackOff; -import org.junit.jupiter.api.Assertions; - -public final class HttpRetryPolicyRetryBackOffTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpRetryPolicyRetryBackOff model = BinaryData.fromString( - "{\"initialDelayInMilliseconds\":2232295730634911769,\"maxIntervalInMilliseconds\":8368000594620652423}") - .toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpRetryPolicyRetryBackOff model - = new HttpRetryPolicyRetryBackOff().withInitialDelayInMilliseconds(2232295730634911769L) - .withMaxIntervalInMilliseconds(8368000594620652423L); - model = BinaryData.fromObject(model).toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index d6ecc83199b11..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettingsRoutes model - = BinaryData.fromString("{\"apiPrefix\":\"enjbdlwtgrhp\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("enjbdlwtgrhp", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("enjbdlwtgrhp"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("enjbdlwtgrhp", 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 d967aa4fdf54f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.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.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettings model = BinaryData.fromString( - "{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"wooc\"},\"forwardProxy\":{\"convention\":\"Standard\",\"customHostHeaderName\":\"qvpkvlrxnjeaseip\",\"customProtoHeaderName\":\"oflokey\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(true, model.requireHttps()); - Assertions.assertEquals("wooc", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.STANDARD, model.forwardProxy().convention()); - Assertions.assertEquals("qvpkvlrxnjeaseip", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("oflokey", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model = new HttpSettings().withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("wooc")) - .withForwardProxy(new ForwardProxy().withConvention(ForwardProxyConvention.STANDARD) - .withCustomHostHeaderName("qvpkvlrxnjeaseip") - .withCustomProtoHeaderName("oflokey")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(true, model.requireHttps()); - Assertions.assertEquals("wooc", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.STANDARD, model.forwardProxy().convention()); - Assertions.assertEquals("qvpkvlrxnjeaseip", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("oflokey", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IdentitySettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IdentitySettingsTests.java deleted file mode 100644 index b1a9150d4d6bd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IdentitySettingsTests.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.IdentitySettings; -import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; -import org.junit.jupiter.api.Assertions; - -public final class IdentitySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentitySettings model = BinaryData.fromString("{\"identity\":\"eeyebi\",\"lifecycle\":\"None\"}") - .toObject(IdentitySettings.class); - Assertions.assertEquals("eeyebi", model.identity()); - Assertions.assertEquals(IdentitySettingsLifeCycle.NONE, model.lifecycle()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentitySettings model - = new IdentitySettings().withIdentity("eeyebi").withLifecycle(IdentitySettingsLifeCycle.NONE); - model = BinaryData.fromObject(model).toObject(IdentitySettings.class); - Assertions.assertEquals("eeyebi", model.identity()); - Assertions.assertEquals(IdentitySettingsLifeCycle.NONE, model.lifecycle()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java deleted file mode 100644 index 08910a22d223d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; -import org.junit.jupiter.api.Assertions; - -public final class IngressPortMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressPortMapping model - = BinaryData.fromString("{\"external\":true,\"targetPort\":1010479001,\"exposedPort\":403427600}") - .toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(1010479001, model.targetPort()); - Assertions.assertEquals(403427600, model.exposedPort()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressPortMapping model - = new IngressPortMapping().withExternal(true).withTargetPort(1010479001).withExposedPort(403427600); - model = BinaryData.fromObject(model).toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(1010479001, model.targetPort()); - Assertions.assertEquals(403427600, model.exposedPort()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java deleted file mode 100644 index f5793c8ace6bd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import org.junit.jupiter.api.Assertions; - -public final class IngressStickySessionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressStickySessions model - = BinaryData.fromString("{\"affinity\":\"none\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.NONE); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 941d8411b8807..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.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.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; - -public final class IpSecurityRestrictionRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpSecurityRestrictionRule model = BinaryData.fromString( - "{\"name\":\"oftrmaequia\",\"description\":\"icslfaoq\",\"ipAddressRange\":\"piyylhalnswhccsp\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("oftrmaequia", model.name()); - Assertions.assertEquals("icslfaoq", model.description()); - Assertions.assertEquals("piyylhalnswhccsp", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = new IpSecurityRestrictionRule().withName("oftrmaequia") - .withDescription("icslfaoq") - .withIpAddressRange("piyylhalnswhccsp") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("oftrmaequia", model.name()); - Assertions.assertEquals("icslfaoq", model.description()); - Assertions.assertEquals("piyylhalnswhccsp", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java deleted file mode 100644 index 0b18d40ff8242..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"fxjelg\",\"value\":\"pzqjhhhq\"}") - .toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("fxjelg", model.propertyName()); - Assertions.assertEquals("pzqjhhhq", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentConfigurationProperty model - = new JavaComponentConfigurationProperty().withPropertyName("fxjelg").withValue("pzqjhhhq"); - model = BinaryData.fromObject(model).toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("fxjelg", model.propertyName()); - Assertions.assertEquals("pzqjhhhq", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentIngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentIngressTests.java deleted file mode 100644 index 3d58155b3c599..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentIngressTests.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.JavaComponentIngress; - -public final class JavaComponentIngressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentIngress model - = BinaryData.fromString("{\"fqdn\":\"gevgwmse\"}").toObject(JavaComponentIngress.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentIngress model = new JavaComponentIngress(); - model = BinaryData.fromObject(model).toObject(JavaComponentIngress.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java deleted file mode 100644 index 7d387ae0846c7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"ormkfqlwxldyk\",\"value\":\"sy\"}],\"scale\":{\"minReplicas\":2007438165,\"maxReplicas\":1807199058},\"serviceBinds\":[{\"name\":\"bmjk\",\"serviceId\":\"bjgsjjxxahmrn\"},{\"name\":\"zyqegxyiv\",\"serviceId\":\"nbm\"},{\"name\":\"bjijkgqxnh\",\"serviceId\":\"keznjaujvaa\"},{\"name\":\"ggiycwkdtaawxwf\",\"serviceId\":\"aumrrqmbzmqkrat\"}]},\"id\":\"xwbjs\",\"name\":\"dbirkfpksokdgo\",\"type\":\"ewijymrhbguz\"}") - .toObject(JavaComponentInner.class); - Assertions.assertEquals("ormkfqlwxldyk", model.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("sy", model.properties().configurations().get(0).value()); - Assertions.assertEquals(2007438165, model.properties().scale().minReplicas()); - Assertions.assertEquals(1807199058, model.properties().scale().maxReplicas()); - Assertions.assertEquals("bmjk", model.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("bjgsjjxxahmrn", model.properties().serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentInner model = new JavaComponentInner().withProperties(new JavaComponentProperties() - .withConfigurations(Arrays - .asList(new JavaComponentConfigurationProperty().withPropertyName("ormkfqlwxldyk").withValue("sy"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(2007438165).withMaxReplicas(1807199058)) - .withServiceBinds( - Arrays.asList(new JavaComponentServiceBind().withName("bmjk").withServiceId("bjgsjjxxahmrn"), - new JavaComponentServiceBind().withName("zyqegxyiv").withServiceId("nbm"), - new JavaComponentServiceBind().withName("bjijkgqxnh").withServiceId("keznjaujvaa"), - new JavaComponentServiceBind().withName("ggiycwkdtaawxwf").withServiceId("aumrrqmbzmqkrat")))); - model = BinaryData.fromObject(model).toObject(JavaComponentInner.class); - Assertions.assertEquals("ormkfqlwxldyk", model.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("sy", model.properties().configurations().get(0).value()); - Assertions.assertEquals(2007438165, model.properties().scale().minReplicas()); - Assertions.assertEquals(1807199058, model.properties().scale().maxReplicas()); - Assertions.assertEquals("bmjk", model.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("bjgsjjxxahmrn", model.properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesScaleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesScaleTests.java deleted file mode 100644 index 388ff23dd2cc5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesScaleTests.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.JavaComponentPropertiesScale; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentPropertiesScaleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentPropertiesScale model - = BinaryData.fromString("{\"minReplicas\":26618529,\"maxReplicas\":1797841912}") - .toObject(JavaComponentPropertiesScale.class); - Assertions.assertEquals(26618529, model.minReplicas()); - Assertions.assertEquals(1797841912, model.maxReplicas()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentPropertiesScale model - = new JavaComponentPropertiesScale().withMinReplicas(26618529).withMaxReplicas(1797841912); - model = BinaryData.fromObject(model).toObject(JavaComponentPropertiesScale.class); - Assertions.assertEquals(26618529, model.minReplicas()); - Assertions.assertEquals(1797841912, model.maxReplicas()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java deleted file mode 100644 index fe29ef21365ba..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.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.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"nfnzhhh\",\"value\":\"smffjkutycyarnr\"}],\"scale\":{\"minReplicas\":214389671,\"maxReplicas\":2107621897},\"serviceBinds\":[{\"name\":\"ghktdpy\",\"serviceId\":\"hcoeocnhzq\"},{\"name\":\"ttjzcfyjzpt\",\"serviceId\":\"lohap\"},{\"name\":\"nfszpyglqdhmrjz\",\"serviceId\":\"l\"},{\"name\":\"pjby\",\"serviceId\":\"sjoqcjenkyhfqzvs\"}]}") - .toObject(JavaComponentProperties.class); - Assertions.assertEquals("nfnzhhh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("smffjkutycyarnr", model.configurations().get(0).value()); - Assertions.assertEquals(214389671, model.scale().minReplicas()); - Assertions.assertEquals(2107621897, model.scale().maxReplicas()); - Assertions.assertEquals("ghktdpy", model.serviceBinds().get(0).name()); - Assertions.assertEquals("hcoeocnhzq", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentProperties model = new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("nfnzhhh").withValue("smffjkutycyarnr"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(214389671).withMaxReplicas(2107621897)) - .withServiceBinds( - Arrays.asList(new JavaComponentServiceBind().withName("ghktdpy").withServiceId("hcoeocnhzq"), - new JavaComponentServiceBind().withName("ttjzcfyjzpt").withServiceId("lohap"), - new JavaComponentServiceBind().withName("nfszpyglqdhmrjz").withServiceId("l"), - new JavaComponentServiceBind().withName("pjby").withServiceId("sjoqcjenkyhfqzvs"))); - model = BinaryData.fromObject(model).toObject(JavaComponentProperties.class); - Assertions.assertEquals("nfnzhhh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("smffjkutycyarnr", model.configurations().get(0).value()); - Assertions.assertEquals(214389671, model.scale().minReplicas()); - Assertions.assertEquals(2107621897, model.scale().maxReplicas()); - Assertions.assertEquals("ghktdpy", model.serviceBinds().get(0).name()); - Assertions.assertEquals("hcoeocnhzq", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java deleted file mode 100644 index 1fb6927a22f51..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentServiceBind model = BinaryData.fromString("{\"name\":\"acoyvivbsizusjs\",\"serviceId\":\"bscm\"}") - .toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("acoyvivbsizusjs", model.name()); - Assertions.assertEquals("bscm", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentServiceBind model - = new JavaComponentServiceBind().withName("acoyvivbsizusjs").withServiceId("bscm"); - model = BinaryData.fromObject(model).toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("acoyvivbsizusjs", model.name()); - Assertions.assertEquals("bscm", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java deleted file mode 100644 index cf11f757aead3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qroohtu\",\"value\":\"maonurj\"},{\"propertyName\":\"mghihp\",\"value\":\"cmslclblyjxltbs\"},{\"propertyName\":\"scvsfxigctm\",\"value\":\"uupb\"}],\"scale\":{\"minReplicas\":922272916,\"maxReplicas\":1106041304},\"serviceBinds\":[{\"name\":\"ceukdqkkyihztg\",\"serviceId\":\"mgqzgwldoyc\"},{\"name\":\"llcecfehuwaoa\",\"serviceId\":\"h\"},{\"name\":\"qllizstac\",\"serviceId\":\"vhrweftkwqejpmv\"},{\"name\":\"ehaepwamcxtc\",\"serviceId\":\"upeuknijduyye\"}]},\"id\":\"ydjfb\",\"name\":\"c\",\"type\":\"v\"},{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"wikdmh\",\"value\":\"kuflgbh\"},{\"propertyName\":\"uacdixmxuf\",\"value\":\"ryjqgdkf\"}],\"scale\":{\"minReplicas\":1021158786,\"maxReplicas\":1850515821},\"serviceBinds\":[{\"name\":\"jhvefgwbmqjchnt\",\"serviceId\":\"faymxbulpz\"},{\"name\":\"lbm\",\"serviceId\":\"yojwyvfkmbtsu\"},{\"name\":\"xsgxjcmmzrrs\",\"serviceId\":\"biwsd\"},{\"name\":\"pxqwo\",\"serviceId\":\"ffjxcjrmmuabwib\"}]},\"id\":\"ogjo\",\"name\":\"mcyefoyzbam\",\"type\":\"in\"},{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"kpoldtvevboc\",\"value\":\"hzjkn\"}],\"scale\":{\"minReplicas\":1180422043,\"maxReplicas\":483249279},\"serviceBinds\":[{\"name\":\"nrup\",\"serviceId\":\"amrdixtrekidswys\"}]},\"id\":\"ruffgllukk\",\"name\":\"tvlxhrpqh\",\"type\":\"mblcouqehbhbcds\"}],\"nextLink\":\"ryrando\"}") - .toObject(JavaComponentsCollection.class); - Assertions.assertEquals("qroohtu", model.value().get(0).properties().configurations().get(0).propertyName()); - Assertions.assertEquals("maonurj", model.value().get(0).properties().configurations().get(0).value()); - Assertions.assertEquals(922272916, model.value().get(0).properties().scale().minReplicas()); - Assertions.assertEquals(1106041304, model.value().get(0).properties().scale().maxReplicas()); - Assertions.assertEquals("ceukdqkkyihztg", model.value().get(0).properties().serviceBinds().get(0).name()); - Assertions.assertEquals("mgqzgwldoyc", model.value().get(0).properties().serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentsCollection model - = new JavaComponentsCollection().withValue(Arrays.asList( - new JavaComponentInner() - .withProperties(new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("qroohtu").withValue("maonurj"), - new JavaComponentConfigurationProperty().withPropertyName("mghihp") - .withValue("cmslclblyjxltbs"), - new JavaComponentConfigurationProperty().withPropertyName("scvsfxigctm").withValue("uupb"))) - .withScale( - new JavaComponentPropertiesScale().withMinReplicas(922272916).withMaxReplicas(1106041304)) - .withServiceBinds(Arrays.asList( - new JavaComponentServiceBind().withName("ceukdqkkyihztg").withServiceId("mgqzgwldoyc"), - new JavaComponentServiceBind().withName("llcecfehuwaoa").withServiceId("h"), - new JavaComponentServiceBind().withName("qllizstac").withServiceId("vhrweftkwqejpmv"), - new JavaComponentServiceBind().withName("ehaepwamcxtc").withServiceId("upeuknijduyye")))), - new JavaComponentInner() - .withProperties(new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("wikdmh").withValue("kuflgbh"), - new JavaComponentConfigurationProperty().withPropertyName("uacdixmxuf") - .withValue("ryjqgdkf"))) - .withScale( - new JavaComponentPropertiesScale().withMinReplicas(1021158786).withMaxReplicas(1850515821)) - .withServiceBinds(Arrays.asList( - new JavaComponentServiceBind().withName("jhvefgwbmqjchnt").withServiceId("faymxbulpz"), - new JavaComponentServiceBind().withName("lbm").withServiceId("yojwyvfkmbtsu"), - new JavaComponentServiceBind().withName("xsgxjcmmzrrs").withServiceId("biwsd"), - new JavaComponentServiceBind().withName("pxqwo").withServiceId("ffjxcjrmmuabwib")))), - new JavaComponentInner().withProperties(new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("kpoldtvevboc").withValue("hzjkn"))) - .withScale( - new JavaComponentPropertiesScale().withMinReplicas(1180422043).withMaxReplicas(483249279)) - .withServiceBinds(Arrays - .asList(new JavaComponentServiceBind().withName("nrup").withServiceId("amrdixtrekidswys")))))); - model = BinaryData.fromObject(model).toObject(JavaComponentsCollection.class); - Assertions.assertEquals("qroohtu", model.value().get(0).properties().configurations().get(0).propertyName()); - Assertions.assertEquals("maonurj", model.value().get(0).properties().configurations().get(0).value()); - Assertions.assertEquals(922272916, model.value().get(0).properties().scale().minReplicas()); - Assertions.assertEquals(1106041304, model.value().get(0).properties().scale().maxReplicas()); - Assertions.assertEquals("ceukdqkkyihztg", model.value().get(0).properties().serviceBinds().get(0).name()); - Assertions.assertEquals("mgqzgwldoyc", model.value().get(0).properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index a285d0c926b40..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JavaComponentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"urkep\",\"value\":\"ehqqylm\"},{\"propertyName\":\"twjwdsdlzm\",\"value\":\"erxxxoteehkhowgo\"},{\"propertyName\":\"vhxowpcbapnpxra\",\"value\":\"wbmpspfeylqloc\"},{\"propertyName\":\"ujexayglxrk\",\"value\":\"nmzpas\"}],\"scale\":{\"minReplicas\":890793558,\"maxReplicas\":402195294},\"serviceBinds\":[{\"name\":\"fpieidzlvs\",\"serviceId\":\"ywjopac\"}]},\"id\":\"hydv\",\"name\":\"kmfngpmillxgjs\",\"type\":\"izwgsoriobijeiyd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JavaComponent response = manager.javaComponents() - .define("mcxqqxmyzklao") - .withExistingManagedEnvironment("xlu", "kft") - .withProperties(new JavaComponentProperties() - .withConfigurations(Arrays - .asList(new JavaComponentConfigurationProperty().withPropertyName("mzrqraz").withValue("ivznllas"), - new JavaComponentConfigurationProperty().withPropertyName("skhj").withValue("pvbaih"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1962293618).withMaxReplicas(2110088551)) - .withServiceBinds(Arrays.asList( - new JavaComponentServiceBind().withName("ywbqgroigbsfsgs").withServiceId("nwldfmhljq"), - new JavaComponentServiceBind().withName("spmrjct").withServiceId("ldsxebuhsxrz"), - new JavaComponentServiceBind().withName("gsdaluyckh").withServiceId("rbhseuerbgpxebjl")))) - .create(); - - Assertions.assertEquals("urkep", response.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("ehqqylm", response.properties().configurations().get(0).value()); - Assertions.assertEquals(890793558, response.properties().scale().minReplicas()); - Assertions.assertEquals(402195294, response.properties().scale().maxReplicas()); - Assertions.assertEquals("fpieidzlvs", response.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("ywjopac", response.properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java deleted file mode 100644 index aa083acc7deda..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JavaComponentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"joxtdahne\",\"value\":\"ovt\"},{\"propertyName\":\"ztivfwjl\",\"value\":\"zekfsrmauklajv\"}],\"scale\":{\"minReplicas\":630907604,\"maxReplicas\":1874917407},\"serviceBinds\":[{\"name\":\"jovtkwxnhwhhn\",\"serviceId\":\"rzaaoee\"},{\"name\":\"mjenvjeatea\",\"serviceId\":\"crxoxdj\"}]},\"id\":\"dnaryyinzk\",\"name\":\"olrndwdb\",\"type\":\"xvzaledoy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JavaComponent response = manager.javaComponents() - .getWithResponse("soy", "yxyj", "cbqp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("joxtdahne", response.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("ovt", response.properties().configurations().get(0).value()); - Assertions.assertEquals(630907604, response.properties().scale().minReplicas()); - Assertions.assertEquals(1874917407, response.properties().scale().maxReplicas()); - Assertions.assertEquals("jovtkwxnhwhhn", response.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("rzaaoee", response.properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java deleted file mode 100644 index b1923f4388410..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JavaComponentsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"httnzqs\",\"value\":\"mebgszplu\"},{\"propertyName\":\"ekpdzzmssg\",\"value\":\"vokyejidbdqzsqun\"},{\"propertyName\":\"wztlvvwsnmrkky\",\"value\":\"repwpwfkcaux\"},{\"propertyName\":\"avcpfpdofuckclbt\",\"value\":\"ue\"}],\"scale\":{\"minReplicas\":725742425,\"maxReplicas\":580481302},\"serviceBinds\":[{\"name\":\"ngojfsqebuuxjx\",\"serviceId\":\"xfjwp\"},{\"name\":\"ktpmbmxb\",\"serviceId\":\"rwgzzxl\"},{\"name\":\"khxsdplaumy\",\"serviceId\":\"hweqjfyxydgtok\"},{\"name\":\"bvwglgwzp\",\"serviceId\":\"akglhpsesrfga\"}]},\"id\":\"iydvxc\",\"name\":\"d\",\"type\":\"yhgoq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.javaComponents().list("dtjva", "yyznmrgcdogcvuc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("httnzqs", - response.iterator().next().properties().configurations().get(0).propertyName()); - Assertions.assertEquals("mebgszplu", response.iterator().next().properties().configurations().get(0).value()); - Assertions.assertEquals(725742425, response.iterator().next().properties().scale().minReplicas()); - Assertions.assertEquals(580481302, response.iterator().next().properties().scale().maxReplicas()); - Assertions.assertEquals("ngojfsqebuuxjx", response.iterator().next().properties().serviceBinds().get(0).name()); - Assertions.assertEquals("xfjwp", response.iterator().next().properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java deleted file mode 100644 index 4e460250be967..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationManualTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationManualTriggerConfig model - = BinaryData.fromString("{\"replicaCompletionCount\":1422511233,\"parallelism\":1025559588}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(1422511233, model.replicaCompletionCount()); - Assertions.assertEquals(1025559588, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model - = new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1422511233) - .withParallelism(1025559588); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(1422511233, model.replicaCompletionCount()); - Assertions.assertEquals(1025559588, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java deleted file mode 100644 index 05ef99349b475..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.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.JobConfigurationScheduleTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationScheduleTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = BinaryData - .fromString( - "{\"replicaCompletionCount\":718100150,\"cronExpression\":\"mlwywaeeczg\",\"parallelism\":2069370787}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(718100150, model.replicaCompletionCount()); - Assertions.assertEquals("mlwywaeeczg", model.cronExpression()); - Assertions.assertEquals(2069370787, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model - = new JobConfigurationScheduleTriggerConfig().withReplicaCompletionCount(718100150) - .withCronExpression("mlwywaeeczg") - .withParallelism(2069370787); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(718100150, model.replicaCompletionCount()); - Assertions.assertEquals("mlwywaeeczg", model.cronExpression()); - Assertions.assertEquals(2069370787, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java deleted file mode 100644 index 8923847f00569..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionBaseInner model - = BinaryData.fromString("{\"name\":\"sybwptdaca\",\"id\":\"vlf\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("sybwptdaca", model.name()); - Assertions.assertEquals("vlf", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("sybwptdaca").withId("vlf"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("sybwptdaca", model.name()); - Assertions.assertEquals("vlf", model.id()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java deleted file mode 100644 index 775084092b0d6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.ReplicaExecutionStatus; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionInner model = BinaryData.fromString( - "{\"name\":\"gwumgxdgdhpa\",\"id\":\"dexjddvjs\",\"type\":\"wotmmwllcolsrsxa\",\"properties\":{\"status\":\"Processing\",\"startTime\":\"2021-04-01T03:23:07Z\",\"endTime\":\"2021-03-09T11:00:51Z\",\"template\":{\"containers\":[{\"image\":\"jljnhvlqjbek\",\"name\":\"eksnbksdqhjvyk\",\"command\":[\"sl\"],\"args\":[\"ustcpoq\",\"avnwqj\",\"g\",\"knlejjjkxybwfd\"],\"env\":[{},{}],\"resources\":{\"cpu\":60.943224543269345,\"memory\":\"svkzykj\",\"ephemeralStorage\":\"kns\"}},{\"image\":\"wushcdp\",\"name\":\"pn\",\"command\":[\"gjfbpkuwxeoi\",\"jfizfavkjzwfbc\",\"aykmmf\",\"sbfwxr\"],\"args\":[\"dew\"],\"env\":[{},{}],\"resources\":{\"cpu\":77.68566374552775,\"memory\":\"bjazejwwviy\",\"ephemeralStorage\":\"ps\"}},{\"image\":\"brnnhjxsqw\",\"name\":\"qkbiwet\",\"command\":[\"ycyqiqyhgfsetzl\",\"xbsfledynoj\",\"ziu\"],\"args\":[\"zkkdtnhqs\",\"cljse\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":31.673528645996928,\"memory\":\"afhlbyl\",\"ephemeralStorage\":\"bevxrhyzd\"}},{\"image\":\"rsofpltdbmairrh\",\"name\":\"fnrac\",\"command\":[\"qigtuujwouhdaws\",\"grbjbxsjybvitvqk\",\"y\",\"znumtggmuwdchoz\"],\"args\":[\"fexl\",\"xn\"],\"env\":[{},{}],\"resources\":{\"cpu\":74.29099049732783,\"memory\":\"iknaqlnuwig\",\"ephemeralStorage\":\"xly\"}}],\"initContainers\":[{\"image\":\"vx\",\"name\":\"wxh\",\"command\":[\"jtlkexaonwivkcqh\",\"xhxknlc\"],\"args\":[\"mkyupijub\",\"qjfkakfqfrkemyi\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":80.08756513780673,\"memory\":\"cowvfdjkp\",\"ephemeralStorage\":\"phlkksnm\"}},{\"image\":\"vyfijdkzuqnw\",\"name\":\"thuqolyahluq\",\"command\":[\"lsutrjbh\",\"ykfhyqezvqqugdrf\",\"bcvex\"],\"args\":[\"quowtljvfwhrea\",\"khyxvrqtvbcz\",\"ulmdgglm\",\"pjpfseykgs\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":89.34675754345622,\"memory\":\"afp\",\"ephemeralStorage\":\"lkvec\"}}]},\"detailedStatus\":{\"replicas\":[{\"name\":\"goadyedmzr\",\"containers\":[{},{},{}]},{\"name\":\"knubnoitp\",\"containers\":[{},{},{}]},{\"name\":\"rgdg\",\"containers\":[{},{}]},{\"name\":\"qraswugyxpqitwei\",\"containers\":[{},{},{},{}]}]}}}") - .toObject(JobExecutionInner.class); - Assertions.assertEquals("gwumgxdgdhpa", model.name()); - Assertions.assertEquals("dexjddvjs", model.id()); - Assertions.assertEquals("wotmmwllcolsrsxa", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T03:23:07Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T11:00:51Z"), model.endTime()); - Assertions.assertEquals("jljnhvlqjbek", model.template().containers().get(0).image()); - Assertions.assertEquals("eksnbksdqhjvyk", model.template().containers().get(0).name()); - Assertions.assertEquals("sl", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("ustcpoq", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(60.943224543269345D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("svkzykj", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("vx", model.template().initContainers().get(0).image()); - Assertions.assertEquals("wxh", model.template().initContainers().get(0).name()); - Assertions.assertEquals("jtlkexaonwivkcqh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("mkyupijub", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(80.08756513780673D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("cowvfdjkp", model.template().initContainers().get(0).resources().memory()); - Assertions.assertEquals("goadyedmzr", model.detailedStatus().replicas().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionInner model - = new JobExecutionInner().withName("gwumgxdgdhpa") - .withId("dexjddvjs") - .withType("wotmmwllcolsrsxa") - .withStartTime(OffsetDateTime.parse("2021-04-01T03:23:07Z")) - .withEndTime(OffsetDateTime.parse("2021-03-09T11:00:51Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer().withImage("jljnhvlqjbek") - .withName("eksnbksdqhjvyk") - .withCommand(Arrays.asList("sl")) - .withArgs(Arrays.asList("ustcpoq", "avnwqj", "g", "knlejjjkxybwfd")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(60.943224543269345D) - .withMemory("svkzykj")), - new JobExecutionContainer().withImage("wushcdp") - .withName("pn") - .withCommand( - Arrays.asList("gjfbpkuwxeoi", "jfizfavkjzwfbc", "aykmmf", "sbfwxr")) - .withArgs(Arrays.asList("dew")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(77.68566374552775D) - .withMemory("bjazejwwviy")), - new JobExecutionContainer().withImage("brnnhjxsqw") - .withName("qkbiwet") - .withCommand(Arrays.asList("ycyqiqyhgfsetzl", "xbsfledynoj", "ziu")) - .withArgs(Arrays.asList("zkkdtnhqs", "cljse")) - .withEnv(Arrays - .asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources() - .withCpu(31.673528645996928D) - .withMemory("afhlbyl")), - new JobExecutionContainer().withImage("rsofpltdbmairrh") - .withName("fnrac") - .withCommand(Arrays.asList("qigtuujwouhdaws", "grbjbxsjybvitvqk", "y", - "znumtggmuwdchoz")) - .withArgs(Arrays.asList("fexl", "xn")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(74.29099049732783D) - .withMemory("iknaqlnuwig")))) - .withInitContainers(Arrays.asList( - new JobExecutionContainer().withImage("vx") - .withName("wxh") - .withCommand(Arrays.asList("jtlkexaonwivkcqh", "xhxknlc")) - .withArgs(Arrays.asList("mkyupijub", "qjfkakfqfrkemyi")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar())) - .withResources( - new ContainerResources().withCpu(80.08756513780673D).withMemory("cowvfdjkp")), - new JobExecutionContainer().withImage("vyfijdkzuqnw") - .withName("thuqolyahluq") - .withCommand(Arrays.asList("lsutrjbh", "ykfhyqezvqqugdrf", "bcvex")) - .withArgs(Arrays.asList("quowtljvfwhrea", "khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar())) - .withResources( - new ContainerResources().withCpu(89.34675754345622D).withMemory("afp"))))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList( - new ReplicaExecutionStatus().withName("goadyedmzr") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus(), - new ContainerExecutionStatus())), - new ReplicaExecutionStatus().withName("knubnoitp") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus(), - new ContainerExecutionStatus())), - new ReplicaExecutionStatus().withName("rgdg") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus())), - new ReplicaExecutionStatus().withName("qraswugyxpqitwei") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus(), - new ContainerExecutionStatus(), new ContainerExecutionStatus()))))); - model = BinaryData.fromObject(model).toObject(JobExecutionInner.class); - Assertions.assertEquals("gwumgxdgdhpa", model.name()); - Assertions.assertEquals("dexjddvjs", model.id()); - Assertions.assertEquals("wotmmwllcolsrsxa", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T03:23:07Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T11:00:51Z"), model.endTime()); - Assertions.assertEquals("jljnhvlqjbek", model.template().containers().get(0).image()); - Assertions.assertEquals("eksnbksdqhjvyk", model.template().containers().get(0).name()); - Assertions.assertEquals("sl", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("ustcpoq", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(60.943224543269345D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("svkzykj", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("vx", model.template().initContainers().get(0).image()); - Assertions.assertEquals("wxh", model.template().initContainers().get(0).name()); - Assertions.assertEquals("jtlkexaonwivkcqh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("mkyupijub", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(80.08756513780673D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("cowvfdjkp", model.template().initContainers().get(0).resources().memory()); - Assertions.assertEquals("goadyedmzr", model.detailedStatus().replicas().get(0).name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java deleted file mode 100644 index 75b1614c7be03..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("adhfztlray", "rkgzkyhudbkuw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java deleted file mode 100644 index 9ff0e9120b1fe..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsExecutionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"eoftnorwai\",\"id\":\"ioctqk\",\"type\":\"ja\",\"properties\":{\"status\":\"Succeeded\",\"startTime\":\"2021-08-22T09:01:23Z\",\"endTime\":\"2021-05-14T08:05:49Z\",\"template\":{\"containers\":[{\"image\":\"oss\",\"name\":\"jxtvlxxzqfcwrrio\",\"command\":[\"ezwy\",\"j\"],\"args\":[\"iqegm\",\"db\",\"ohcwhpyv\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"tszwcanzb\",\"name\":\"kwuyck\",\"command\":[\"ensmuffiwjbct\",\"bpzujqjtotdxp\",\"scsl\"],\"args\":[\"usiecktybhjuxid\",\"hxomilddxjx\",\"ugxwjwilmqrslaat\"],\"env\":[{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"zgxqgqwlxr\",\"name\":\"tvhvtqqy\",\"command\":[\"kteo\"],\"args\":[\"ogmkorvvmvmco\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"bsn\",\"name\":\"nqliwkmzoj\",\"command\":[\"yalhtgm\",\"nazgbjbhrpgiq\"],\"args\":[\"cucrcm\",\"aixpqj\",\"wifhbksldttohq\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"h\",\"name\":\"siqikvllrht\",\"command\":[\"lxkoi\",\"mtrawrqkza\",\"bun\",\"paklw\"],\"args\":[\"eeprnejzl\"],\"env\":[{},{}],\"resources\":{}}]},\"detailedStatus\":{\"replicas\":[{\"name\":\"xscbduxapgrcqe\",\"containers\":[{},{}]},{\"name\":\"djomlnwsbvvdl\",\"containers\":[{},{},{}]},{\"name\":\"kq\",\"containers\":[{},{}]}]}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.jobsExecutions().list("euynh", "okayrg", "ybriop", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eoftnorwai", response.iterator().next().name()); - Assertions.assertEquals("ioctqk", response.iterator().next().id()); - Assertions.assertEquals("ja", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T09:01:23Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-14T08:05:49Z"), response.iterator().next().endTime()); - Assertions.assertEquals("oss", response.iterator().next().template().containers().get(0).image()); - Assertions.assertEquals("jxtvlxxzqfcwrrio", response.iterator().next().template().containers().get(0).name()); - Assertions.assertEquals("ezwy", response.iterator().next().template().containers().get(0).command().get(0)); - Assertions.assertEquals("iqegm", response.iterator().next().template().containers().get(0).args().get(0)); - Assertions.assertEquals("zgxqgqwlxr", response.iterator().next().template().initContainers().get(0).image()); - Assertions.assertEquals("tvhvtqqy", response.iterator().next().template().initContainers().get(0).name()); - Assertions.assertEquals("kteo", response.iterator().next().template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("ogmkorvvmvmco", - response.iterator().next().template().initContainers().get(0).args().get(0)); - Assertions.assertEquals("xscbduxapgrcqe", response.iterator().next().detailedStatus().replicas().get(0).name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 5e338c64cdce9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"metadata\":{\"id\":\"lbkl\",\"name\":\"mnnkkwayqshw\",\"description\":\"xrid\",\"author\":\"bsaqjm\",\"category\":\"xqwqueu\",\"supportTopicList\":[{\"id\":\"tpziizevjy\",\"pesId\":\"fvezefk\"},{\"id\":\"qt\",\"pesId\":\"lepjjzkcasf\"},{\"id\":\"c\",\"pesId\":\"o\"},{\"id\":\"fjwajnrt\",\"pesId\":\"vaqkifmxawost\"}],\"analysisTypes\":[\"nhrkmjqncfvdsc\",\"hemvwfnqqwypvnd\",\"wbgodtggrssg\"],\"type\":\"fk\",\"score\":12.798208},\"dataset\":[{\"table\":{\"tableName\":\"mvecvztscbgmusai\",\"columns\":[{},{}],\"rows\":[\"datankzzohnrddclz\"]},\"renderingProperties\":{\"type\":1312159373,\"title\":\"ehlbzqixbnjrqvzy\",\"description\":\"xozony\",\"isVisible\":true}},{\"table\":{\"tableName\":\"udpabcreuwzos\",\"columns\":[{},{}],\"rows\":[\"datacvasormrexzvdu\"]},\"renderingProperties\":{\"type\":842951636,\"title\":\"ygbadu\",\"description\":\"covsdqhzrtd\",\"isVisible\":false}}],\"status\":{\"message\":\"imzfvpp\",\"statusId\":414377585},\"dataProviderMetadata\":{\"providerName\":\"fjmclngygnhrkomb\",\"propertyBag\":[{\"name\":\"jdopggorwjo\",\"value\":\"rotpvclpof\"},{\"name\":\"lmwkptskwxjg\",\"value\":\"xccb\"},{\"name\":\"akmkookbput\",\"value\":\"vmuyak\"},{\"name\":\"wk\",\"value\":\"ow\"}]}},\"id\":\"royrdurxf\",\"name\":\"zqjim\",\"type\":\"jtgzj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = manager.jobs() - .getDetectorWithResponse("cjdk", "otcsu", "mzoonsvobchkxfpw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nhrkmjqncfvdsc", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("mvecvztscbgmusai", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1312159373, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("ehlbzqixbnjrqvzy", - response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xozony", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("imzfvpp", response.properties().status().message()); - Assertions.assertEquals(414377585, response.properties().status().statusId()); - Assertions.assertEquals("fjmclngygnhrkomb", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("jdopggorwjo", - response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("rotpvclpof", - response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsMockTests.java deleted file mode 100644 index e66350569baaf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"olmugpyvao\",\"name\":\"kluwz\",\"description\":\"ygz\",\"author\":\"yevjhubnobguq\",\"category\":\"qsq\",\"supportTopicList\":[{\"id\":\"ioyj\",\"pesId\":\"mlviqcpszpmcvqdv\"},{\"id\":\"mvxyrxdh\",\"pesId\":\"qojbxao\"},{\"id\":\"gbzxmbtplefoioy\",\"pesId\":\"oxznvgvd\"}],\"analysisTypes\":[\"uvda\",\"sxmrszbknimxlp\"],\"type\":\"rxrzutylcur\",\"score\":4.548967},\"dataset\":[{\"table\":{\"tableName\":\"qaeht\",\"columns\":[{},{}],\"rows\":[\"datanvynfaooeactedc\",\"datalsk\",\"datak\"]},\"renderingProperties\":{\"type\":247319273,\"title\":\"hzllrqmtlpbyxro\",\"description\":\"uyqyp\",\"isVisible\":true}},{\"table\":{\"tableName\":\"iicsudyhbrjjt\",\"columns\":[{},{},{},{}],\"rows\":[\"datasjrholuqwgus\",\"dataxhdod\",\"datajwyblvtbdmvsb\",\"dataidaelqpvekmkwjfb\"]},\"renderingProperties\":{\"type\":912529746,\"title\":\"gdusxurs\",\"description\":\"v\",\"isVisible\":true}}],\"status\":{\"message\":\"coqwczsyiqri\",\"statusId\":916243678},\"dataProviderMetadata\":{\"providerName\":\"vaangqtnhjrfdmf\",\"propertyBag\":[{\"name\":\"aexxjfwtgdfkka\",\"value\":\"gvmuafmczf\"},{\"name\":\"yuepsvpltidajjvy\",\"value\":\"ocfkumcfjxoky\"}]}},\"id\":\"syasvfnkwmygjjek\",\"name\":\"knfdr\",\"type\":\"gjqyckgtxkrdtulc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.jobs().listDetectors("hmmlc", "yarnggcjfwblqhxk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uvda", response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("qaeht", response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(247319273, - response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("hzllrqmtlpbyxro", - response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("uyqyp", - response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, - response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("coqwczsyiqri", response.iterator().next().properties().status().message()); - Assertions.assertEquals(916243678, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("vaangqtnhjrfdmf", - response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("aexxjfwtgdfkka", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("gvmuafmczf", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java deleted file mode 100644 index ad9427e286ae9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsStopExecutionMockTests { - @Test - public void testStopExecution() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().stopExecution("by", "fqpgaixwrgr", "kderf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java deleted file mode 100644 index a1d62bc55dd16..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsStopMultipleExecutionsMockTests { - @Test - public void testStopMultipleExecutions() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"nxhtf\",\"id\":\"qbsudzpgchzpg\",\"type\":\"umjdjxhzghg\",\"properties\":{\"status\":\"Failed\",\"startTime\":\"2021-01-05T00:02:43Z\",\"endTime\":\"2021-01-05T16:16:30Z\",\"template\":{\"containers\":[{}],\"initContainers\":[{}]},\"detailedStatus\":{\"replicas\":[{}]}}}],\"nextLink\":\"mxjdnaju\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppJobExecutions response - = manager.jobs().stopMultipleExecutions("swqi", "wepwoggg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nxhtf", response.value().get(0).name()); - Assertions.assertEquals("qbsudzpgchzpg", response.value().get(0).id()); - Assertions.assertEquals("umjdjxhzghg", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T00:02:43Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T16:16:30Z"), response.value().get(0).endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java deleted file mode 100644 index 5431a4045353a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JwtClaimChecksTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JwtClaimChecks model = BinaryData - .fromString("{\"allowedGroups\":[\"snb\"],\"allowedClientApplications\":[\"abnmocpcyshu\",\"zafb\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("snb", model.allowedGroups().get(0)); - Assertions.assertEquals("abnmocpcyshu", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = new JwtClaimChecks().withAllowedGroups(Arrays.asList("snb")) - .withAllowedClientApplications(Arrays.asList("abnmocpcyshu", "zafb")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("snb", model.allowedGroups().get(0)); - Assertions.assertEquals("abnmocpcyshu", model.allowedClientApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java deleted file mode 100644 index 2370b4f6a1fc7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; - -public final class KedaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KedaConfiguration model = BinaryData.fromString("{\"version\":\"vl\"}").toObject(KedaConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KedaConfiguration model = new KedaConfiguration(); - model = BinaryData.fromObject(model).toObject(KedaConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java deleted file mode 100644 index 3726fc9941c2a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.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.UsageInner; -import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"currentValue\":41.2557,\"limit\":14.812088,\"name\":{\"value\":\"rsiwdyjqur\",\"localizedValue\":\"crraueekcsu\"}},{\"currentValue\":1.5593171,\"limit\":12.774044,\"name\":{\"value\":\"ddacbcbgydlqidy\",\"localizedValue\":\"hmptyrilkfbn\"}},{\"currentValue\":55.588596,\"limit\":89.35382,\"name\":{\"value\":\"vzt\",\"localizedValue\":\"nfnqtxjtomals\"}},{\"currentValue\":43.106903,\"limit\":78.589905,\"name\":{\"value\":\"ddepldwqjns\",\"localizedValue\":\"ygleexa\"}}],\"nextLink\":\"mywhsb\"}") - .toObject(ListUsagesResult.class); - Assertions.assertEquals(41.2557f, model.value().get(0).currentValue()); - Assertions.assertEquals(14.812088f, model.value().get(0).limit()); - Assertions.assertEquals("rsiwdyjqur", model.value().get(0).name().value()); - Assertions.assertEquals("crraueekcsu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("mywhsb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult() - .withValue(Arrays.asList( - new UsageInner().withCurrentValue(41.2557f) - .withLimit(14.812088f) - .withName(new UsageName().withValue("rsiwdyjqur").withLocalizedValue("crraueekcsu")), - new UsageInner().withCurrentValue(1.5593171f) - .withLimit(12.774044f) - .withName(new UsageName().withValue("ddacbcbgydlqidy").withLocalizedValue("hmptyrilkfbn")), - new UsageInner().withCurrentValue(55.588596f) - .withLimit(89.35382f) - .withName(new UsageName().withValue("vzt").withLocalizedValue("nfnqtxjtomals")), - new UsageInner().withCurrentValue(43.106903f) - .withLimit(78.589905f) - .withName(new UsageName().withValue("ddepldwqjns").withLocalizedValue("ygleexa")))) - .withNextLink("mywhsb"); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - Assertions.assertEquals(41.2557f, model.value().get(0).currentValue()); - Assertions.assertEquals(14.812088f, model.value().get(0).limit()); - Assertions.assertEquals("rsiwdyjqur", model.value().get(0).name().value()); - Assertions.assertEquals("crraueekcsu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("mywhsb", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoggerSettingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoggerSettingTests.java deleted file mode 100644 index 56d15ece3f042..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoggerSettingTests.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.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import org.junit.jupiter.api.Assertions; - -public final class LoggerSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoggerSetting model - = BinaryData.fromString("{\"logger\":\"klff\",\"level\":\"debug\"}").toObject(LoggerSetting.class); - Assertions.assertEquals("klff", model.logger()); - Assertions.assertEquals(Level.DEBUG, model.level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoggerSetting model = new LoggerSetting().withLogger("klff").withLevel(Level.DEBUG); - model = BinaryData.fromObject(model).toObject(LoggerSetting.class); - Assertions.assertEquals("klff", model.logger()); - Assertions.assertEquals(Level.DEBUG, model.level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java deleted file mode 100644 index 3c21201c92fa7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; - -public final class LogicAppInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicAppInner model = BinaryData - .fromString( - "{\"properties\":\"dataaqylkjztji\",\"id\":\"zjcg\",\"name\":\"xitp\",\"type\":\"inzcpdltkrlgj\"}") - .toObject(LogicAppInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicAppInner model = new LogicAppInner().withProperties("dataaqylkjztji"); - model = BinaryData.fromObject(model).toObject(LogicAppInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 4606c6ad63875..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":\"datawgqrntaum\",\"id\":\"cjlvkrkegtyc\",\"name\":\"uppiyxlzm\",\"type\":\"yddeeqz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogicApp response = manager.logicApps() - .define("xlxicwgp") - .withExistingContainerApp("lkdlgwgna", "kuuyiuyuaf") - .withProperties("datadc") - .create(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.java deleted file mode 100644 index 6bb639b4bb5b1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.logicApps().deleteWithResponse("mxrfomckew", "my", "fopxf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.java deleted file mode 100644 index 0d2829fcd805b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsDeployWorkflowArtifactsWithResponseMockTests { - @Test - public void testDeployWorkflowArtifactsWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.logicApps() - .deployWorkflowArtifactsWithResponse("bgacnr", "fdtncmspsanma", "eubkqiqmlf", - new WorkflowArtifacts().withAppSettings("datalqcskkqjmxptueip") - .withFiles("datagkwdr") - .withFilesToDelete(Arrays.asList("pahu", "onjkkxukguehvvp", "joegcjojlleuidp", "tonvhgnhtmeplhb")), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.java deleted file mode 100644 index aeac42f8fde94..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":\"datayedzfzq\",\"id\":\"uqhtdereuno\",\"name\":\"a\",\"type\":\"zwhpjlwyxedz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogicApp response = manager.logicApps() - .getWithResponse("vktjhffecqkoq", "ouergaghp", "zxkpyehhfdyld", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.java deleted file mode 100644 index c1238da7bcacb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsInvokeWithResponseMockTests { - @Test - public void testInvokeWithResponse() throws Exception { - String responseStr = "\"dataeotmf\""; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Object response = manager.logicApps() - .invokeWithResponse("xbriifefn", "s", "vrqoemwsi", "eailwdqmqf", LogicAppsProxyMethod.GET, - com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 a6a89d5d62eca..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import org.junit.jupiter.api.Assertions; - -public final class LoginRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"l\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("l", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("l"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("l", 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 af2cb60aaee25..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginScopesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginScopes model = BinaryData.fromString("{\"scopes\":[\"clwhijcoejctbz\"]}").toObject(LoginScopes.class); - Assertions.assertEquals("clwhijcoejctbz", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("clwhijcoejctbz")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("clwhijcoejctbz", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java deleted file mode 100644 index c565f177aa1f8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogsConfiguration model - = BinaryData.fromString("{\"destinations\":[\"txd\",\"hmoz\",\"sgzv\"]}").toObject(LogsConfiguration.class); - Assertions.assertEquals("txd", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogsConfiguration model = new LogsConfiguration().withDestinations(Arrays.asList("txd", "hmoz", "sgzv")); - model = BinaryData.fromObject(model).toObject(LogsConfiguration.class); - Assertions.assertEquals("txd", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java deleted file mode 100644 index 03f637f5a43c3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.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.ManagedCertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedCertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCertificatePatch model - = BinaryData.fromString("{\"tags\":{\"cclfgxannn\":\"spxklu\",\"ewxigpxvk\":\"ytzpo\"}}") - .toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("spxklu", model.tags().get("cclfgxannn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model - = new ManagedCertificatePatch().withTags(mapOf("cclfgxannn", "spxklu", "ewxigpxvk", "ytzpo")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("spxklu", model.tags().get("cclfgxannn")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 82e261f99abbd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedCertificates() - .deleteWithResponse("wuhw", "wjnoxuo", "tfnressfepgck", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 02cd00b0cbbd3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"metadata\":{\"id\":\"agdvcdqhftz\",\"name\":\"yfaofdf\",\"description\":\"tncwmhjobzrfpr\",\"author\":\"dc\",\"category\":\"yftcvbzwgwhg\",\"supportTopicList\":[{\"id\":\"auoors\",\"pesId\":\"tfybipufdmxuqb\"},{\"id\":\"nasttuxvzfqayop\",\"pesId\":\"sixhgvbhx\"},{\"id\":\"dztgsqja\",\"pesId\":\"mar\"},{\"id\":\"eibpgbrhbjdqkn\",\"pesId\":\"nmotpuwnnoh\"}],\"analysisTypes\":[\"ngocfrjuypwyi\",\"laynosugkf\",\"axttpfsmwgs\",\"hqucum\"],\"type\":\"dau\",\"score\":49.593155},\"dataset\":[{\"table\":{\"tableName\":\"thxuarigrjdl\",\"columns\":[{},{},{},{}],\"rows\":[\"datavkrbzkuastaxklpr\"]},\"renderingProperties\":{\"type\":801885966,\"title\":\"l\",\"description\":\"izwxvs\",\"isVisible\":false}},{\"table\":{\"tableName\":\"yyskyekgafxczv\",\"columns\":[{},{}],\"rows\":[\"datartwletyves\",\"datartlhpdhwyn\",\"datatacz\",\"datanjfmbbfnvjxit\"]},\"renderingProperties\":{\"type\":1661586982,\"title\":\"rtiklsmnihqlco\",\"description\":\"syi\",\"isVisible\":true}}],\"status\":{\"message\":\"wbgbudav\",\"statusId\":638512610},\"dataProviderMetadata\":{\"providerName\":\"ccqcdhth\",\"propertyBag\":[{\"name\":\"irknucosaw\",\"value\":\"tnagzlgpya\"},{\"name\":\"ihzqjjtsmuy\",\"value\":\"fttkacybdueu\"}]}},\"id\":\"mcdcpkshl\",\"name\":\"jermhzic\",\"type\":\"bfdjhyaaknyukibx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = manager.managedEnvironmentDiagnostics() - .getDetectorWithResponse("uz", "wjecooyvhtuqbpe", "nii", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ngocfrjuypwyi", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("thxuarigrjdl", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(801885966, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("l", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("izwxvs", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("wbgbudav", response.properties().status().message()); - Assertions.assertEquals(638512610, response.properties().status().statusId()); - Assertions.assertEquals("ccqcdhth", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("irknucosaw", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("tnagzlgpya", - response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 1309fcfc51102..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests { - @Test - public void testListDetectorsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"mtmvwituwey\",\"name\":\"shcybwfuppox\",\"description\":\"cmvouujxdiikmoxr\",\"author\":\"svavlrxikjmoy\",\"category\":\"unpip\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"zfn\"],\"type\":\"patpf\",\"score\":77.88766},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"whxorpwaltz\",\"statusId\":1877042144},\"dataProviderMetadata\":{\"providerName\":\"ojfccylhtrht\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"jpwexcdrz\",\"name\":\"robzzxezmnrkjgpj\",\"type\":\"uxsphlokfpm\"},{\"properties\":{\"metadata\":{\"id\":\"vzvfb\",\"name\":\"bd\",\"description\":\"fvcgnrglaqr\",\"author\":\"ambhbafebzxf\",\"category\":\"qutibhl\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"vrkpsa\"],\"type\":\"u\",\"score\":38.36888},\"dataset\":[{},{},{}],\"status\":{\"message\":\"nysvlpyeuukppd\",\"statusId\":521816147},\"dataProviderMetadata\":{\"providerName\":\"lxvhhyqqegatxgrz\",\"propertyBag\":[{}]}},\"id\":\"nmtsdixc\",\"name\":\"w\",\"type\":\"ibmg\"},{\"properties\":{\"metadata\":{\"id\":\"cjc\",\"name\":\"airwcqzoofj\",\"description\":\"jsvepfbhtleberp\",\"author\":\"jeknfqnw\",\"category\":\"qxowkdn\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"rhw\",\"ehycpn\"],\"type\":\"awonoehrguqlhfw\",\"score\":21.82771},\"dataset\":[{},{},{}],\"status\":{\"message\":\"yrguyfazbk\",\"statusId\":196544276},\"dataProviderMetadata\":{\"providerName\":\"vthrmxkb\",\"propertyBag\":[{},{},{}]}},\"id\":\"dxomrawppk\",\"name\":\"boozflyacagaed\",\"type\":\"oiqclmgdtwgab\"}],\"nextLink\":\"f\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DiagnosticsCollection response = manager.managedEnvironmentDiagnostics() - .listDetectorsWithResponse("bfs", "eqbbewfcuqfpy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zfn", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("whxorpwaltz", response.value().get(0).properties().status().message()); - Assertions.assertEquals(1877042144, response.value().get(0).properties().status().statusId()); - Assertions.assertEquals("ojfccylhtrht", - response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 16fbab743036c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"groupIds\":[\"bja\"],\"privateEndpoint\":{\"id\":\"oclannmxynlsuq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"trkt\",\"actionsRequired\":\"patr\"},\"provisioningState\":\"Succeeded\"},\"id\":\"tfinfhoksmmculwk\",\"name\":\"icruo\",\"type\":\"krjflsgaojb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response - = manager.managedEnvironmentPrivateEndpointConnections() - .define("ujjcxgdqmrlhn") - .withExistingManagedEnvironment("jxvtrkfkgenjqnnp", "wkosnyxigf") - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("ekd") - .withActionsRequired("vuftrsvjmnsvu")) - .create(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("trkt", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("patr", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 6f341c86d48f1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"groupIds\":[\"vmkinwtey\",\"qshixbc\"],\"privateEndpoint\":{\"id\":\"pylblfsprrwc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"tc\",\"actionsRequired\":\"fx\"},\"provisioningState\":\"Updating\"},\"id\":\"zfslxizhqikmgob\",\"name\":\"iqemcdiiisklbon\",\"type\":\"xu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.managedEnvironmentPrivateEndpointConnections() - .getWithResponse("jlm", "vdorsirx", "hyrkqakofajfr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("tc", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fx", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index 2fc1743d07197..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentPrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"htuzlxiwyopgar\",\"fctwra\"],\"privateEndpoint\":{\"id\":\"dojq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"sipiysnjqyowa\",\"actionsRequired\":\"c\"},\"provisioningState\":\"Updating\"},\"id\":\"a\",\"name\":\"undtsew\",\"type\":\"aupwhlzyckrem\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.managedEnvironmentPrivateEndpointConnections() - .list("vdrijanxndm", "vardlmzjotprrm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("sipiysnjqyowa", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("c", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.java deleted file mode 100644 index eabbd1981c776..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"jiswllu\",\"requiredMembers\":[\"hfwlfxzfwugeup\",\"knecexkgrv\",\"psjdmng\",\"yt\"],\"requiredZoneNames\":[\"zfyxcnwawoxcg\",\"bejqfbifopfjx\",\"wdrpa\",\"q\"]},\"id\":\"rfm\",\"name\":\"wotfcuu\",\"type\":\"gtji\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.managedEnvironmentPrivateLinkResources() - .list("qpqsdoctpzpuj", "flmcdsgxc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zfyxcnwawoxcg", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java deleted file mode 100644 index 49dc98f35e54b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = BinaryData.fromString("{\"mtls\":{\"enabled\":false}}") - .toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(false, model.mtls().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model - = new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(false)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(false, model.mtls().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.java deleted file mode 100644 index 8a27c7c7c32ed..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.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.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption model - = BinaryData.fromString("{\"enabled\":true}") - .toObject(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption model - = new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(true); - model = BinaryData.fromObject(model) - .toObject(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.java deleted file mode 100644 index fa5a7e9e6d9e8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfiguration model - = BinaryData.fromString("{\"encryption\":{\"enabled\":false}}") - .toObject(ManagedEnvironmentPropertiesPeerTrafficConfiguration.class); - Assertions.assertEquals(false, model.encryption().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfiguration model - = new ManagedEnvironmentPropertiesPeerTrafficConfiguration().withEncryption( - new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(false)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerTrafficConfiguration.class); - Assertions.assertEquals(false, model.encryption().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java deleted file mode 100644 index a2e2d385a95ea..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Usage; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentUsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"currentValue\":51.928596,\"limit\":92.0443,\"name\":{\"value\":\"w\",\"localizedValue\":\"ihwpadhedbfobd\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.managedEnvironmentUsages().list("yyrqaedwov", "cytjgoea", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(51.928596f, response.iterator().next().currentValue()); - Assertions.assertEquals(92.0443f, response.iterator().next().limit()); - Assertions.assertEquals("w", response.iterator().next().name().value()); - Assertions.assertEquals("ihwpadhedbfobd", response.iterator().next().name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 77356ce4f86b3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("wfhxwyrkbre", "zl", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java deleted file mode 100644 index 388df51698ea8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"minimumCount\":691575719,\"maximumCount\":1783164068,\"currentCount\":1641268662},\"id\":\"yuvtz\",\"name\":\"xzhclec\",\"type\":\"wtzqzcloyhy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("klfnisyxgucbmt", "ed", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(691575719, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(1783164068, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(1641268662, response.iterator().next().properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index a6c5c1d4c36ac..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironmentsStorages() - .deleteWithResponse("pn", "qpwnikxkcajgr", "rct", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index abc41ca4d1951..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"230c3431-b6d5-45e1-ad60-982d38be0cc6\",\"tenantId\":\"3608a43e-8e31-482c-be6d-7870288cda0c\",\"type\":\"None\",\"userAssignedIdentities\":{\"kphywpnvjto\":{\"principalId\":\"66b8cf76-f18a-4c22-b85f-11e970ce403d\",\"clientId\":\"de3ffd42-35fa-4062-b784-aaa4baefabd1\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("kphywpnvjto", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java deleted file mode 100644 index 131eaa0ae3ef3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.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.MetricsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricsConfiguration model - = BinaryData.fromString("{\"includeKeda\":true,\"destinations\":[\"jzfpafolpymwamx\"]}") - .toObject(MetricsConfiguration.class); - Assertions.assertEquals(true, model.includeKeda()); - Assertions.assertEquals("jzfpafolpymwamx", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricsConfiguration model - = new MetricsConfiguration().withIncludeKeda(true).withDestinations(Arrays.asList("jzfpafolpymwamx")); - model = BinaryData.fromObject(model).toObject(MetricsConfiguration.class); - Assertions.assertEquals(true, model.includeKeda()); - Assertions.assertEquals("jzfpafolpymwamx", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java deleted file mode 100644 index f78edccfaf21d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class MtlsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mtls model = BinaryData.fromString("{\"enabled\":true}").toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mtls model = new Mtls().withEnabled(true); - model = BinaryData.fromObject(model).toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NacosComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NacosComponentTests.java deleted file mode 100644 index ad10b7e7dfe75..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NacosComponentTests.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.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.NacosComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NacosComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NacosComponent model = BinaryData.fromString( - "{\"componentType\":\"Nacos\",\"ingress\":{\"fqdn\":\"yngjgvrquvpygglp\"},\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"eljtiahxmfqryarv\",\"value\":\"zqbglcjkays\"},{\"propertyName\":\"hz\",\"value\":\"ubtlmjtg\"},{\"propertyName\":\"ioskkfmkmfdjxyxg\",\"value\":\"kqvjcteoedlr\"},{\"propertyName\":\"skkzpxvjnzdpvo\",\"value\":\"jhpcn\"}],\"scale\":{\"minReplicas\":379540195,\"maxReplicas\":2097322331},\"serviceBinds\":[{\"name\":\"ytexvzilmhivzk\",\"serviceId\":\"wncknr\"},{\"name\":\"ajlskzptj\",\"serviceId\":\"lwe\"},{\"name\":\"yrth\",\"serviceId\":\"lehmcgcjeinueho\"},{\"name\":\"mvfejvqnttmbqd\",\"serviceId\":\"zfivfokpysthhzag\"}]}") - .toObject(NacosComponent.class); - Assertions.assertEquals("eljtiahxmfqryarv", model.configurations().get(0).propertyName()); - Assertions.assertEquals("zqbglcjkays", model.configurations().get(0).value()); - Assertions.assertEquals(379540195, model.scale().minReplicas()); - Assertions.assertEquals(2097322331, model.scale().maxReplicas()); - Assertions.assertEquals("ytexvzilmhivzk", model.serviceBinds().get(0).name()); - Assertions.assertEquals("wncknr", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NacosComponent model - = new NacosComponent() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("eljtiahxmfqryarv") - .withValue("zqbglcjkays"), - new JavaComponentConfigurationProperty().withPropertyName("hz").withValue("ubtlmjtg"), - new JavaComponentConfigurationProperty().withPropertyName("ioskkfmkmfdjxyxg") - .withValue("kqvjcteoedlr"), - new JavaComponentConfigurationProperty().withPropertyName("skkzpxvjnzdpvo").withValue("jhpcn"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(379540195).withMaxReplicas(2097322331)) - .withServiceBinds( - Arrays.asList(new JavaComponentServiceBind().withName("ytexvzilmhivzk").withServiceId("wncknr"), - new JavaComponentServiceBind().withName("ajlskzptj").withServiceId("lwe"), - new JavaComponentServiceBind().withName("yrth").withServiceId("lehmcgcjeinueho"), - new JavaComponentServiceBind().withName("mvfejvqnttmbqd").withServiceId("zfivfokpysthhzag"))) - .withIngress(new JavaComponentIngress()); - model = BinaryData.fromObject(model).toObject(NacosComponent.class); - Assertions.assertEquals("eljtiahxmfqryarv", model.configurations().get(0).propertyName()); - Assertions.assertEquals("zqbglcjkays", model.configurations().get(0).value()); - Assertions.assertEquals(379540195, model.scale().minReplicas()); - Assertions.assertEquals(2097322331, model.scale().maxReplicas()); - Assertions.assertEquals("ytexvzilmhivzk", model.serviceBinds().get(0).name()); - Assertions.assertEquals("wncknr", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 9f959749fd2c4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespacesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"vwfqjch\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = manager.namespaces() - .checkNameAvailabilityWithResponse("hua", "zmzivrtrfzhhez", - new CheckNameAvailabilityRequest().withName("judxdyyrud").withType("hswtvdkxbqssgfe"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("vwfqjch", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java deleted file mode 100644 index 04722508c139a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.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.AccessMode; -import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; -import org.junit.jupiter.api.Assertions; - -public final class NfsAzureFilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NfsAzureFileProperties model = BinaryData - .fromString("{\"server\":\"yejsxtlg\",\"accessMode\":\"ReadOnly\",\"shareName\":\"gziiucijjcea\"}") - .toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("yejsxtlg", model.server()); - Assertions.assertEquals(AccessMode.READ_ONLY, model.accessMode()); - Assertions.assertEquals("gziiucijjcea", model.shareName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NfsAzureFileProperties model = new NfsAzureFileProperties().withServer("yejsxtlg") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("gziiucijjcea"); - model = BinaryData.fromObject(model).toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("yejsxtlg", model.server()); - Assertions.assertEquals(AccessMode.READ_ONLY, model.accessMode()); - Assertions.assertEquals("gziiucijjcea", model.shareName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index 9b7b04146c173..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; - -public final class NonceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nonce model = BinaryData.fromString("{\"validateNonce\":false,\"nonceExpirationInterval\":\"ampmngnz\"}") - .toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("ampmngnz", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("ampmngnz"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("ampmngnz", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java deleted file mode 100644 index 713af822f1a56..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.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.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OpenIdConnectLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OpenIdConnectLogin model = BinaryData.fromString("{\"nameClaimType\":\"evgbmqjq\",\"scopes\":[\"y\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("evgbmqjq", model.nameClaimType()); - Assertions.assertEquals("y", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model - = new OpenIdConnectLogin().withNameClaimType("evgbmqjq").withScopes(Arrays.asList("y")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("evgbmqjq", model.nameClaimType()); - Assertions.assertEquals("y", 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 d8638166c2b64..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDetailInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDetailInner model = BinaryData.fromString( - "{\"name\":\"gh\",\"isDataAction\":false,\"display\":{\"provider\":\"tlffhzbkr\",\"resource\":\"jjavfq\",\"operation\":\"hnqoewdo\",\"description\":\"yetesy\"},\"origin\":\"idbz\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("gh", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tlffhzbkr", model.display().provider()); - Assertions.assertEquals("jjavfq", model.display().resource()); - Assertions.assertEquals("hnqoewdo", model.display().operation()); - Assertions.assertEquals("yetesy", model.display().description()); - Assertions.assertEquals("idbz", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = new OperationDetailInner().withName("gh") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("tlffhzbkr") - .withResource("jjavfq") - .withOperation("hnqoewdo") - .withDescription("yetesy")) - .withOrigin("idbz"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("gh", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tlffhzbkr", model.display().provider()); - Assertions.assertEquals("jjavfq", model.display().resource()); - Assertions.assertEquals("hnqoewdo", model.display().operation()); - Assertions.assertEquals("yetesy", model.display().description()); - Assertions.assertEquals("idbz", 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 3eddea433f365..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.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.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"hqtfbovn\",\"resource\":\"kbwetnj\",\"operation\":\"p\",\"description\":\"rkzyaupia\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hqtfbovn", model.provider()); - Assertions.assertEquals("kbwetnj", model.resource()); - Assertions.assertEquals("p", model.operation()); - Assertions.assertEquals("rkzyaupia", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("hqtfbovn") - .withResource("kbwetnj") - .withOperation("p") - .withDescription("rkzyaupia"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hqtfbovn", model.provider()); - Assertions.assertEquals("kbwetnj", model.resource()); - Assertions.assertEquals("p", model.operation()); - Assertions.assertEquals("rkzyaupia", 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 5801df0acd9dd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"dirdammtzjgc\",\"isDataAction\":true,\"display\":{\"provider\":\"bwjjirmuydgf\",\"resource\":\"mdofgeoagfuoft\",\"operation\":\"odwxmdajwiygmgs\",\"description\":\"mdmze\"},\"origin\":\"rstgfczljdnc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dirdammtzjgc", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("bwjjirmuydgf", response.iterator().next().display().provider()); - Assertions.assertEquals("mdofgeoagfuoft", response.iterator().next().display().resource()); - Assertions.assertEquals("odwxmdajwiygmgs", response.iterator().next().display().operation()); - Assertions.assertEquals("mdmze", response.iterator().next().display().description()); - Assertions.assertEquals("rstgfczljdnc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchCollectionTests.java deleted file mode 100644 index 9c583249d5ee0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchCollectionTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import com.azure.resourcemanager.appcontainers.models.PatchCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PatchCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"targetEnvironmentId\":\"is\",\"targetContainerAppId\":\"w\",\"targetRevisionId\":\"hwplefaxvx\",\"patchApplyStatus\":\"Succeeded\",\"createdAt\":\"2021-10-23T15:17:09Z\",\"lastModifiedAt\":\"2021-07-08T19:53:14Z\",\"patchDetails\":[{\"targetContainerName\":\"zeyqxtjjfzqlqhyc\",\"targetImage\":\"vodggxdbee\",\"lastDetectionTime\":\"2021-01-10T06:37:58Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"knlrariaawiuagy\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"ylyrfgiagtco\",\"targetImage\":\"ocqwogfnzjvus\",\"lastDetectionTime\":\"2021-06-09T04:39:41Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"mozuxylfsb\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"ysownbtgkbug\",\"targetImage\":\"jqctojcmisofie\",\"lastDetectionTime\":\"2021-03-06T19:28:26Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"ojyqdhcuplcplcw\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"}]},\"id\":\"lhzdsqtzb\",\"name\":\"rgnowcjhfgm\",\"type\":\"ecactx\"},{\"properties\":{\"targetEnvironmentId\":\"teyowclu\",\"targetContainerAppId\":\"vekqvgqo\",\"targetRevisionId\":\"ifzmpjwyivqi\",\"patchApplyStatus\":\"RebaseInProgress\",\"createdAt\":\"2021-05-10T21:47:58Z\",\"lastModifiedAt\":\"2021-06-21T15:40:21Z\",\"patchDetails\":[{\"targetContainerName\":\"phuagrttikteusq\",\"targetImage\":\"zkvyklx\",\"lastDetectionTime\":\"2021-04-15T18:56:28Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"affmmfblcqc\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"ibrta\",\"targetImage\":\"metttwgd\",\"lastDetectionTime\":\"2021-03-28T07:37:54Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"ihhrmo\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"Other\"},{\"targetContainerName\":\"eypxiutcxapzhyr\",\"targetImage\":\"etoge\",\"lastDetectionTime\":\"2021-07-23T00:05:49Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"slhvnhlab\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"zjcjbtr\",\"targetImage\":\"aehvvibrxjjstoq\",\"lastDetectionTime\":\"2021-08-31T22:29:59Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"pkxztmoobkl\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"Other\"}]},\"id\":\"cwq\",\"name\":\"pimaqxzhemjyh\",\"type\":\"hujswtwkozzwcul\"},{\"properties\":{\"targetEnvironmentId\":\"wpfaj\",\"targetContainerAppId\":\"wltlwtjjguktalh\",\"targetRevisionId\":\"vkcdmxzr\",\"patchApplyStatus\":\"RevisionCreationFailed\",\"createdAt\":\"2021-09-15T13:37:06Z\",\"lastModifiedAt\":\"2021-04-25T21:44:27Z\",\"patchDetails\":[{\"targetContainerName\":\"aaomylweazu\",\"targetImage\":\"cse\",\"lastDetectionTime\":\"2021-05-30T11:51:47Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"npjhlfzswpchwahf\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"fepgfew\",\"targetImage\":\"twly\",\"lastDetectionTime\":\"2021-01-13T00:28:43Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"xykxhdj\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"bcxf\",\"targetImage\":\"bcporxvxcjzhqizx\",\"lastDetectionTime\":\"2021-02-06T15:19:15Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"gqscj\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"Other\"},{\"targetContainerName\":\"uhdqazk\",\"targetImage\":\"tgguwpijrajcivmm\",\"lastDetectionTime\":\"2021-05-22T22:25:38Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"fiwrxgkn\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"}]},\"id\":\"zqodfvpgshox\",\"name\":\"sgbpfgzdjtx\",\"type\":\"zflbqvg\"}],\"nextLink\":\"vl\"}") - .toObject(PatchCollection.class); - Assertions.assertEquals("vl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchCollection model = new PatchCollection().withValue(Arrays.asList(new ContainerAppsPatchResourceInner(), - new ContainerAppsPatchResourceInner(), new ContainerAppsPatchResourceInner())).withNextLink("vl"); - model = BinaryData.fromObject(model).toObject(PatchCollection.class); - Assertions.assertEquals("vl", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.java deleted file mode 100644 index f15d6b9b67e7a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.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.PatchDetailsNewLayer; -import org.junit.jupiter.api.Assertions; - -public final class PatchDetailsNewLayerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchDetailsNewLayer model = BinaryData - .fromString( - "{\"name\":\"jdhttzaefedxi\",\"frameworkAndVersion\":\"hrphkmcrjdqn\",\"osAndVersion\":\"fzpbgtgkyl\"}") - .toObject(PatchDetailsNewLayer.class); - Assertions.assertEquals("jdhttzaefedxi", model.name()); - Assertions.assertEquals("hrphkmcrjdqn", model.frameworkAndVersion()); - Assertions.assertEquals("fzpbgtgkyl", model.osAndVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchDetailsNewLayer model = new PatchDetailsNewLayer().withName("jdhttzaefedxi") - .withFrameworkAndVersion("hrphkmcrjdqn") - .withOsAndVersion("fzpbgtgkyl"); - model = BinaryData.fromObject(model).toObject(PatchDetailsNewLayer.class); - Assertions.assertEquals("jdhttzaefedxi", model.name()); - Assertions.assertEquals("hrphkmcrjdqn", model.frameworkAndVersion()); - Assertions.assertEquals("fzpbgtgkyl", model.osAndVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.java deleted file mode 100644 index e9bd06f3b036e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.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.PatchDetailsOldLayer; -import org.junit.jupiter.api.Assertions; - -public final class PatchDetailsOldLayerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchDetailsOldLayer model = BinaryData - .fromString("{\"name\":\"ghrjeuutl\",\"frameworkAndVersion\":\"ez\",\"osAndVersion\":\"hokvbwnh\"}") - .toObject(PatchDetailsOldLayer.class); - Assertions.assertEquals("ghrjeuutl", model.name()); - Assertions.assertEquals("ez", model.frameworkAndVersion()); - Assertions.assertEquals("hokvbwnh", model.osAndVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchDetailsOldLayer model = new PatchDetailsOldLayer().withName("ghrjeuutl") - .withFrameworkAndVersion("ez") - .withOsAndVersion("hokvbwnh"); - model = BinaryData.fromObject(model).toObject(PatchDetailsOldLayer.class); - Assertions.assertEquals("ghrjeuutl", model.name()); - Assertions.assertEquals("ez", model.frameworkAndVersion()); - Assertions.assertEquals("hokvbwnh", model.osAndVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.java deleted file mode 100644 index 5aec217b64bb4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.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.PatchDetails; - -public final class PatchDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchDetails model = BinaryData.fromString( - "{\"targetContainerName\":\"kknhxkizvytnrzv\",\"targetImage\":\"lj\",\"lastDetectionTime\":\"2021-02-20T05:38:09Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"rano\",\"newLayer\":{\"name\":\"ukkjqnvbroyla\",\"frameworkAndVersion\":\"ulcdisdosf\",\"osAndVersion\":\"jsvg\"},\"oldLayer\":{\"name\":\"hryvy\",\"frameworkAndVersion\":\"t\",\"osAndVersion\":\"lxgccknfnwmbtm\"},\"patchType\":\"FrameworkAndOSSecurity\"}") - .toObject(PatchDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchDetails model = new PatchDetails(); - model = BinaryData.fromObject(model).toObject(PatchDetails.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.java deleted file mode 100644 index f8de283c23a34..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.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.PatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class PatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchProperties model = BinaryData.fromString( - "{\"targetEnvironmentId\":\"itgvkx\",\"targetContainerAppId\":\"yqdrf\",\"targetRevisionId\":\"cealzxwh\",\"patchApplyStatus\":\"RevisionCreationFailed\",\"createdAt\":\"2021-04-17T10:43:30Z\",\"lastModifiedAt\":\"2021-03-27T07:28:32Z\",\"patchDetails\":[{\"targetContainerName\":\"hlwigdivbkbxg\",\"targetImage\":\"mf\",\"lastDetectionTime\":\"2021-09-11T08:38:54Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"asqvd\",\"newLayer\":{\"name\":\"y\",\"frameworkAndVersion\":\"xakjsqzhzb\",\"osAndVersion\":\"kgimsidxasic\"},\"oldLayer\":{\"name\":\"vvjskgfmocwahp\",\"frameworkAndVersion\":\"atjeaahh\",\"osAndVersion\":\"hhnakzybbj\"},\"patchType\":\"FrameworkSecurity\"},{\"targetContainerName\":\"jks\",\"targetImage\":\"xkyxvxevblbj\",\"lastDetectionTime\":\"2021-03-19T03:04:44Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"jlageu\",\"newLayer\":{\"name\":\"xuns\",\"frameworkAndVersion\":\"bn\",\"osAndVersion\":\"pxynenlsvxeizzg\"},\"oldLayer\":{\"name\":\"nsrmffeycx\",\"frameworkAndVersion\":\"tpiymerteea\",\"osAndVersion\":\"xqiekkkzddrtk\"},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"jbmxvavre\",\"targetImage\":\"de\",\"lastDetectionTime\":\"2021-07-20T03:47:36Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"cuijpxt\",\"newLayer\":{\"name\":\"wprtu\",\"frameworkAndVersion\":\"sawddjibabxvi\",\"osAndVersion\":\"tvtzeexavoxtfg\"},\"oldLayer\":{\"name\":\"dmdqb\",\"frameworkAndVersion\":\"ypq\",\"osAndVersion\":\"sfj\"},\"patchType\":\"FrameworkSecurity\"},{\"targetContainerName\":\"slhhxudbxv\",\"targetImage\":\"d\",\"lastDetectionTime\":\"2021-02-13T16:52:17Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"irudh\",\"newLayer\":{\"name\":\"es\",\"frameworkAndVersion\":\"dlpagzrcxfail\",\"osAndVersion\":\"xwmdboxd\"},\"oldLayer\":{\"name\":\"ft\",\"frameworkAndVersion\":\"qobr\",\"osAndVersion\":\"nac\"},\"patchType\":\"FrameworkAndOSSecurity\"}]}") - .toObject(PatchProperties.class); - Assertions.assertEquals("itgvkx", model.targetEnvironmentId()); - Assertions.assertEquals("yqdrf", model.targetContainerAppId()); - Assertions.assertEquals("cealzxwh", model.targetRevisionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchProperties model = new PatchProperties().withTargetEnvironmentId("itgvkx") - .withTargetContainerAppId("yqdrf") - .withTargetRevisionId("cealzxwh"); - model = BinaryData.fromObject(model).toObject(PatchProperties.class); - Assertions.assertEquals("itgvkx", model.targetEnvironmentId()); - Assertions.assertEquals("yqdrf", model.targetContainerAppId()); - Assertions.assertEquals("cealzxwh", model.targetRevisionId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.java deleted file mode 100644 index e579f88d12b61..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; -import org.junit.jupiter.api.Assertions; - -public final class PatchSkipConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchSkipConfig model = BinaryData.fromString("{\"skip\":false}").toObject(PatchSkipConfig.class); - Assertions.assertEquals(false, model.skip()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchSkipConfig model = new PatchSkipConfig().withSkip(false); - model = BinaryData.fromObject(model).toObject(PatchSkipConfig.class); - Assertions.assertEquals(false, model.skip()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java deleted file mode 100644 index 38fe3ae4de651..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.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.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PreBuildStepTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PreBuildStep model = BinaryData.fromString( - "{\"description\":\"kbogqxndlkzgx\",\"scripts\":[\"iplbpodxunkbebxm\"],\"httpGet\":{\"url\":\"yyntwl\",\"fileName\":\"qtkoievs\",\"headers\":[\"gqrlltmuwla\"]}}") - .toObject(PreBuildStep.class); - Assertions.assertEquals("kbogqxndlkzgx", model.description()); - Assertions.assertEquals("iplbpodxunkbebxm", model.scripts().get(0)); - Assertions.assertEquals("yyntwl", model.httpGet().url()); - Assertions.assertEquals("qtkoievs", model.httpGet().fileName()); - Assertions.assertEquals("gqrlltmuwla", model.httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreBuildStep model = new PreBuildStep().withDescription("kbogqxndlkzgx") - .withScripts(Arrays.asList("iplbpodxunkbebxm")) - .withHttpGet( - new HttpGet().withUrl("yyntwl").withFileName("qtkoievs").withHeaders(Arrays.asList("gqrlltmuwla"))); - model = BinaryData.fromObject(model).toObject(PreBuildStep.class); - Assertions.assertEquals("kbogqxndlkzgx", model.description()); - Assertions.assertEquals("iplbpodxunkbebxm", model.scripts().get(0)); - Assertions.assertEquals("yyntwl", model.httpGet().url()); - Assertions.assertEquals("qtkoievs", model.httpGet().fileName()); - Assertions.assertEquals("gqrlltmuwla", model.httpGet().headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 56309cd0684ee..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionInnerTests.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.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"groupIds\":[\"updwv\",\"phcnzqtpj\",\"mqrhvthl\",\"iwdcxsmlzzhzd\"],\"privateEndpoint\":{\"id\":\"tlgy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"vlnnpx\",\"actionsRequired\":\"afiqgeaarbgjekg\"},\"provisioningState\":\"Failed\"},\"id\":\"yulidwcwvm\",\"name\":\"eg\",\"type\":\"o\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vlnnpx", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("afiqgeaarbgjekg", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model - = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("vlnnpx") - .withActionsRequired("afiqgeaarbgjekg")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vlnnpx", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("afiqgeaarbgjekg", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 3e7a4e4cf7b38..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupIds\":[\"cwg\",\"xf\",\"vaknokzwjj\",\"r\"],\"privateEndpoint\":{\"id\":\"xldzyyfytpqsix\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ujivyqlkjuvsm\",\"actionsRequired\":\"slzoyov\"},\"provisioningState\":\"Waiting\"},\"id\":\"pqvyb\",\"name\":\"fgvmx\",\"type\":\"okcvtlubses\"},{\"properties\":{\"groupIds\":[\"artr\",\"unlpirykycndz\",\"qi\",\"jreuykbbmn\"],\"privateEndpoint\":{\"id\":\"ltbxoeeonqlnfw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"vqdbpbhfck\",\"actionsRequired\":\"ezcrcssbzhddubb\"},\"provisioningState\":\"Deleting\"},\"id\":\"lhkalehpavawugi\",\"name\":\"j\",\"type\":\"iogqgdminictte\"}],\"nextLink\":\"ohiygspn\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ujivyqlkjuvsm", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("slzoyov", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model - = new PrivateEndpointConnectionListResult().withValue(Arrays.asList( - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("ujivyqlkjuvsm") - .withActionsRequired("slzoyov")), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("vqdbpbhfck") - .withActionsRequired("ezcrcssbzhddubb")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ujivyqlkjuvsm", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("slzoyov", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 386971a32a679..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.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.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"jirwgdnqzbrfk\"],\"privateEndpoint\":{\"id\":\"hzmtksjc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"gsxcdgljplkeua\",\"actionsRequired\":\"tomflrytswfpf\"},\"provisioningState\":\"Canceled\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gsxcdgljplkeua", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("tomflrytswfpf", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("gsxcdgljplkeua") - .withActionsRequired("tomflrytswfpf")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gsxcdgljplkeua", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("tomflrytswfpf", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java deleted file mode 100644 index 4d13045f0755b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"cxnmskwhqjjyslu\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index bda795f6a37ab..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"iytxt\",\"requiredMembers\":[\"kvlbpktgdstyoua\",\"bewreswmowegmmut\"],\"requiredZoneNames\":[\"eyguq\"]},\"id\":\"ijiitns\",\"name\":\"xlzdesygrijwa\",\"type\":\"ufanray\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("eyguq", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("eyguq")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("eyguq", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 0a1be6cd3ae6e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.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.PrivateLinkResourceInner; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResourceListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"czykmktpvw\",\"requiredMembers\":[\"sehch\",\"hufmpq\",\"mqyjgy\"],\"requiredZoneNames\":[\"lod\",\"aeuzanh\",\"fnhsenwphp\",\"fngq\"]},\"id\":\"lidftujwjj\",\"name\":\"fwbeqrkuorh\",\"type\":\"ssruqnmdvhazcvj\"}],\"nextLink\":\"iqswbqer\"}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("lod", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResult model - = new PrivateLinkResourceListResult().withValue(Arrays.asList(new PrivateLinkResourceInner() - .withRequiredZoneNames(Arrays.asList("lod", "aeuzanh", "fnhsenwphp", "fngq")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("lod", model.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index dfae8a2b23090..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"ueqfrojsyd\",\"requiredMembers\":[\"ydkygywezskieca\"],\"requiredZoneNames\":[\"zmxieqvdsmaklix\",\"cahyhx\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("zmxieqvdsmaklix", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("zmxieqvdsmaklix", "cahyhx")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("zmxieqvdsmaklix", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 91d70f5bd880c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.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.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"hhkvpedwqs\",\"actionsRequired\":\"rhmpqvwwsk\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("hhkvpedwqs", model.description()); - Assertions.assertEquals("rhmpqvwwsk", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("hhkvpedwqs") - .withActionsRequired("rhmpqvwwsk"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("hhkvpedwqs", model.description()); - Assertions.assertEquals("rhmpqvwwsk", model.actionsRequired()); - } -} 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 c5a40200f15c9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-10-26T12:31:30Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"mwqkchcxwaxf\",\"containers\":[{\"name\":\"kjexfdeqvhp\",\"containerId\":\"lkkshkbffmbmx\",\"ready\":false,\"started\":true,\"restartCount\":1026663345,\"runningState\":\"Terminated\",\"runningStateDetails\":\"xs\",\"logStreamEndpoint\":\"tf\",\"execEndpoint\":\"gicgaaoepttaq\",\"debugEndpoint\":\"dewemxswv\"},{\"name\":\"unzzjgehk\",\"containerId\":\"imrt\",\"ready\":true,\"started\":false,\"restartCount\":1206713259,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ljqepq\",\"logStreamEndpoint\":\"ixmonstshiyxg\",\"execEndpoint\":\"lfcldu\",\"debugEndpoint\":\"birdsvuwcobiegs\"},{\"name\":\"ninwjizc\",\"containerId\":\"nghgshej\",\"ready\":false,\"started\":true,\"restartCount\":1233756756,\"runningState\":\"Terminated\",\"runningStateDetails\":\"lxqzvn\",\"logStreamEndpoint\":\"sbycucrwnamikz\",\"execEndpoint\":\"rqbsmswziq\",\"debugEndpoint\":\"uhok\"}],\"initContainers\":[{\"name\":\"whvhczznvfb\",\"containerId\":\"jsxjwwix\",\"ready\":true,\"started\":true,\"restartCount\":1286205076,\"runningState\":\"Waiting\",\"runningStateDetails\":\"dvnoamldsehaohdj\",\"logStreamEndpoint\":\"flzokxco\",\"execEndpoint\":\"e\",\"debugEndpoint\":\"jetagltsxoatft\"},{\"name\":\"pnpbswveflocc\",\"containerId\":\"mozi\",\"ready\":false,\"started\":false,\"restartCount\":394748877,\"runningState\":\"Terminated\",\"runningStateDetails\":\"pkyjcxcjxgrytfm\",\"logStreamEndpoint\":\"ycilrmcaykggnox\",\"execEndpoint\":\"t\",\"debugEndpoint\":\"sxwpndfcpfnznthj\"},{\"name\":\"kjaosrxuzv\",\"containerId\":\"mktcqiosmgbza\",\"ready\":true,\"started\":false,\"restartCount\":1712162659,\"runningState\":\"Terminated\",\"runningStateDetails\":\"tlaprltzkatb\",\"logStreamEndpoint\":\"mznnbsoqeqalarvl\",\"execEndpoint\":\"un\",\"debugEndpoint\":\"gfebwlnb\"},{\"name\":\"yreeudz\",\"containerId\":\"vbpdqmjxlyyzglgo\",\"ready\":false,\"started\":false,\"restartCount\":2050380690,\"runningState\":\"Terminated\",\"runningStateDetails\":\"j\",\"logStreamEndpoint\":\"obaxkjeytu\",\"execEndpoint\":\"bfjkw\",\"debugEndpoint\":\"snkq\"}]},\"id\":\"syrq\",\"name\":\"njqhdenxa\",\"type\":\"l\"}]}") - .toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("kjexfdeqvhp", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("lkkshkbffmbmx", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(1026663345, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("whvhczznvfb", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("jsxjwwix", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1286205076, model.value().get(0).initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaCollectionInner model = new ReplicaCollectionInner().withValue(Arrays.asList(new ReplicaInner() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("kjexfdeqvhp") - .withContainerId("lkkshkbffmbmx") - .withReady(false) - .withStarted(true) - .withRestartCount(1026663345), - new ReplicaContainer().withName("unzzjgehk") - .withContainerId("imrt") - .withReady(true) - .withStarted(false) - .withRestartCount(1206713259), - new ReplicaContainer().withName("ninwjizc") - .withContainerId("nghgshej") - .withReady(false) - .withStarted(true) - .withRestartCount(1233756756))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("whvhczznvfb") - .withContainerId("jsxjwwix") - .withReady(true) - .withStarted(true) - .withRestartCount(1286205076), - new ReplicaContainer().withName("pnpbswveflocc") - .withContainerId("mozi") - .withReady(false) - .withStarted(false) - .withRestartCount(394748877), - new ReplicaContainer().withName("kjaosrxuzv") - .withContainerId("mktcqiosmgbza") - .withReady(true) - .withStarted(false) - .withRestartCount(1712162659), - new ReplicaContainer().withName("yreeudz") - .withContainerId("vbpdqmjxlyyzglgo") - .withReady(false) - .withStarted(false) - .withRestartCount(2050380690))))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("kjexfdeqvhp", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("lkkshkbffmbmx", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(1026663345, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("whvhczznvfb", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("jsxjwwix", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1286205076, model.value().get(0).initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index 7e80ed4b55cef..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.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.ReplicaContainer; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaContainer model = BinaryData.fromString( - "{\"name\":\"uqn\",\"containerId\":\"phzfylsgcrp\",\"ready\":true,\"started\":true,\"restartCount\":1496519581,\"runningState\":\"Terminated\",\"runningStateDetails\":\"zelfwyfwl\",\"logStreamEndpoint\":\"jwetnpsihcla\",\"execEndpoint\":\"va\",\"debugEndpoint\":\"pt\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("uqn", model.name()); - Assertions.assertEquals("phzfylsgcrp", model.containerId()); - Assertions.assertEquals(true, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1496519581, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = new ReplicaContainer().withName("uqn") - .withContainerId("phzfylsgcrp") - .withReady(true) - .withStarted(true) - .withRestartCount(1496519581); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("uqn", model.name()); - Assertions.assertEquals("phzfylsgcrp", model.containerId()); - Assertions.assertEquals(true, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1496519581, 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 aa09927054b49..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaInner model = BinaryData.fromString( - "{\"properties\":{\"createdTime\":\"2021-10-07T11:54:14Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"ykprlpyznu\",\"containers\":[{\"name\":\"smexiitdf\",\"containerId\":\"tyasiibmiybnnust\",\"ready\":true,\"started\":true,\"restartCount\":1367151711,\"runningState\":\"Terminated\",\"runningStateDetails\":\"hcmavmqfo\",\"logStreamEndpoint\":\"or\",\"execEndpoint\":\"gyyprotwy\",\"debugEndpoint\":\"ndm\"},{\"name\":\"hu\",\"containerId\":\"mjkavlgorbmft\",\"ready\":true,\"started\":true,\"restartCount\":1649651263,\"runningState\":\"Running\",\"runningStateDetails\":\"vnzcyjto\",\"logStreamEndpoint\":\"vopvp\",\"execEndpoint\":\"bzqgqqi\",\"debugEndpoint\":\"dsvqwt\"},{\"name\":\"ky\",\"containerId\":\"cysihs\",\"ready\":false,\"started\":true,\"restartCount\":1889253771,\"runningState\":\"Waiting\",\"runningStateDetails\":\"tmcdzsufcohd\",\"logStreamEndpoint\":\"zlmcmuapcvhdb\",\"execEndpoint\":\"wqqxeysko\",\"debugEndpoint\":\"zinkfkbgbzbowxeq\"}],\"initContainers\":[{\"name\":\"mygvkzqkj\",\"containerId\":\"okbzef\",\"ready\":false,\"started\":true,\"restartCount\":1829804009,\"runningState\":\"Waiting\",\"runningStateDetails\":\"leipqx\",\"logStreamEndpoint\":\"wvz\",\"execEndpoint\":\"zvd\",\"debugEndpoint\":\"zdix\"},{\"name\":\"q\",\"containerId\":\"odawopqhewjptmcg\",\"ready\":true,\"started\":false,\"restartCount\":803654279,\"runningState\":\"Running\",\"runningStateDetails\":\"la\",\"logStreamEndpoint\":\"tmzlbiojlv\",\"execEndpoint\":\"rbbpneqvcwwyy\",\"debugEndpoint\":\"mochpprprsnmok\"},{\"name\":\"zejnhl\",\"containerId\":\"pbzpcpiljhahz\",\"ready\":true,\"started\":false,\"restartCount\":491953314,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ehol\",\"logStreamEndpoint\":\"jwiuubwefqsfapaq\",\"execEndpoint\":\"e\",\"debugEndpoint\":\"q\"},{\"name\":\"x\",\"containerId\":\"mfxapjwogqqno\",\"ready\":true,\"started\":true,\"restartCount\":1894525187,\"runningState\":\"Terminated\",\"runningStateDetails\":\"wpwyawbz\",\"logStreamEndpoint\":\"qbucljgkyexaoguy\",\"execEndpoint\":\"p\",\"debugEndpoint\":\"sdaultxij\"}]},\"id\":\"mfqwa\",\"name\":\"lnqnmcjn\",\"type\":\"zqdqxt\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("smexiitdf", model.containers().get(0).name()); - Assertions.assertEquals("tyasiibmiybnnust", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1367151711, model.containers().get(0).restartCount()); - Assertions.assertEquals("mygvkzqkj", model.initContainers().get(0).name()); - Assertions.assertEquals("okbzef", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1829804009, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = new ReplicaInner() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("smexiitdf") - .withContainerId("tyasiibmiybnnust") - .withReady(true) - .withStarted(true) - .withRestartCount(1367151711), - new ReplicaContainer().withName("hu") - .withContainerId("mjkavlgorbmft") - .withReady(true) - .withStarted(true) - .withRestartCount(1649651263), - new ReplicaContainer().withName("ky") - .withContainerId("cysihs") - .withReady(false) - .withStarted(true) - .withRestartCount(1889253771))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("mygvkzqkj") - .withContainerId("okbzef") - .withReady(false) - .withStarted(true) - .withRestartCount(1829804009), - new ReplicaContainer().withName("q") - .withContainerId("odawopqhewjptmcg") - .withReady(true) - .withStarted(false) - .withRestartCount(803654279), - new ReplicaContainer().withName("zejnhl") - .withContainerId("pbzpcpiljhahz") - .withReady(true) - .withStarted(false) - .withRestartCount(491953314), - new ReplicaContainer().withName("x") - .withContainerId("mfxapjwogqqno") - .withReady(true) - .withStarted(true) - .withRestartCount(1894525187))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("smexiitdf", model.containers().get(0).name()); - Assertions.assertEquals("tyasiibmiybnnust", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1367151711, model.containers().get(0).restartCount()); - Assertions.assertEquals("mygvkzqkj", model.initContainers().get(0).name()); - Assertions.assertEquals("okbzef", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1829804009, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 22af8439c00d3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaProperties model = BinaryData.fromString( - "{\"createdTime\":\"2021-08-28T15:42:49Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"fusfzsvtuikzhajq\",\"containers\":[{\"name\":\"hm\",\"containerId\":\"qryxyn\",\"ready\":true,\"started\":true,\"restartCount\":1655994607,\"runningState\":\"Running\",\"runningStateDetails\":\"xznptgoeiyb\",\"logStreamEndpoint\":\"bp\",\"execEndpoint\":\"vf\",\"debugEndpoint\":\"kvntjlrigjkskyri\"},{\"name\":\"vzidsxwaab\",\"containerId\":\"ifrygzn\",\"ready\":false,\"started\":false,\"restartCount\":1979636769,\"runningState\":\"Waiting\",\"runningStateDetails\":\"bgopxlhslnel\",\"logStreamEndpoint\":\"eixynllxecwcroj\",\"execEndpoint\":\"slhcawjutifd\",\"debugEndpoint\":\"mvi\"},{\"name\":\"rqjb\",\"containerId\":\"zhraglkafh\",\"ready\":true,\"started\":false,\"restartCount\":1352761194,\"runningState\":\"Terminated\",\"runningStateDetails\":\"pzvcpopmxelnwc\",\"logStreamEndpoint\":\"yjede\",\"execEndpoint\":\"mlfmkqs\",\"debugEndpoint\":\"zuawxtzxpuamwa\"}],\"initContainers\":[{\"name\":\"vxcushsphaivmx\",\"containerId\":\"sflvgsgzwywakoih\",\"ready\":true,\"started\":true,\"restartCount\":1233115603,\"runningState\":\"Terminated\",\"runningStateDetails\":\"hlnymzotq\",\"logStreamEndpoint\":\"yuzcbmqqvxmvw\",\"execEndpoint\":\"tayx\",\"debugEndpoint\":\"supe\"},{\"name\":\"lzqnhcvs\",\"containerId\":\"tnzoibgsxgnxfy\",\"ready\":true,\"started\":false,\"restartCount\":520618832,\"runningState\":\"Terminated\",\"runningStateDetails\":\"o\",\"logStreamEndpoint\":\"bxiqxeiiqbimht\",\"execEndpoint\":\"winhehfqpo\",\"debugEndpoint\":\"wbcb\"},{\"name\":\"mbnkb\",\"containerId\":\"qvxkd\",\"ready\":false,\"started\":false,\"restartCount\":229905373,\"runningState\":\"Waiting\",\"runningStateDetails\":\"wbzuwfmdurage\",\"logStreamEndpoint\":\"zvcjfelisdjubggb\",\"execEndpoint\":\"gkxkbsazgakg\",\"debugEndpoint\":\"yrcmjdmspofap\"},{\"name\":\"hryl\",\"containerId\":\"ofrzgb\",\"ready\":false,\"started\":false,\"restartCount\":1946171356,\"runningState\":\"Waiting\",\"runningStateDetails\":\"l\",\"logStreamEndpoint\":\"bcuiiz\",\"execEndpoint\":\"twfans\",\"debugEndpoint\":\"pdibmikostbzbki\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("hm", model.containers().get(0).name()); - Assertions.assertEquals("qryxyn", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1655994607, model.containers().get(0).restartCount()); - Assertions.assertEquals("vxcushsphaivmx", model.initContainers().get(0).name()); - Assertions.assertEquals("sflvgsgzwywakoih", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1233115603, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = new ReplicaProperties() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("hm") - .withContainerId("qryxyn") - .withReady(true) - .withStarted(true) - .withRestartCount(1655994607), - new ReplicaContainer().withName("vzidsxwaab") - .withContainerId("ifrygzn") - .withReady(false) - .withStarted(false) - .withRestartCount(1979636769), - new ReplicaContainer().withName("rqjb") - .withContainerId("zhraglkafh") - .withReady(true) - .withStarted(false) - .withRestartCount(1352761194))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("vxcushsphaivmx") - .withContainerId("sflvgsgzwywakoih") - .withReady(true) - .withStarted(true) - .withRestartCount(1233115603), - new ReplicaContainer().withName("lzqnhcvs") - .withContainerId("tnzoibgsxgnxfy") - .withReady(true) - .withStarted(false) - .withRestartCount(520618832), - new ReplicaContainer().withName("mbnkb") - .withContainerId("qvxkd") - .withReady(false) - .withStarted(false) - .withRestartCount(229905373), - new ReplicaContainer().withName("hryl") - .withContainerId("ofrzgb") - .withReady(false) - .withStarted(false) - .withRestartCount(1946171356))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("hm", model.containers().get(0).name()); - Assertions.assertEquals("qryxyn", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1655994607, model.containers().get(0).restartCount()); - Assertions.assertEquals("vxcushsphaivmx", model.initContainers().get(0).name()); - Assertions.assertEquals("sflvgsgzwywakoih", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1233115603, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java deleted file mode 100644 index a900bf3e486d2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests { - @Test - public void testGetCustomDomainVerificationIdWithResponse() throws Exception { - String responseStr = "\"urz\""; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - String response = manager.resourceProviders() - .getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("urz", response); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java deleted file mode 100644 index 2ddd05fcf0388..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersJobExecutionWithResponseMockTests { - @Test - public void testJobExecutionWithResponse() throws Exception { - String responseStr - = "{\"name\":\"ltvdhqnufbx\",\"id\":\"iibntojo\",\"type\":\"nybydhuihaouwud\",\"properties\":{\"status\":\"Degraded\",\"startTime\":\"2021-09-23T08:57:31Z\",\"endTime\":\"2021-09-06T22:13:13Z\",\"template\":{\"containers\":[{\"image\":\"umo\",\"name\":\"ircamqprlo\",\"command\":[\"gejcvjkjyczc\",\"tag\",\"lajdyoljeqyxq\",\"mzsizzhravrcjk\"],\"args\":[\"gqb\",\"cxhnqxgzxlerm\",\"merghski\"],\"env\":[{},{},{}],\"resources\":{}},{\"image\":\"pkcbkfukdljq\",\"name\":\"tsdyds\",\"command\":[\"afyalo\",\"ww\"],\"args\":[\"znyufpqzs\",\"ifgufyjfdkqiyv\",\"djokgwesym\",\"qh\"],\"env\":[{}],\"resources\":{}},{\"image\":\"lpe\",\"name\":\"zn\",\"command\":[\"eaujq\",\"bgsimwejlwbkbp\",\"zobdwbcp\"],\"args\":[\"wkuh\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"czkfwfat\",\"name\":\"wphn\",\"command\":[\"vdwgtqcume\",\"saaqgoq\"],\"args\":[\"uy\",\"sbskowkrbhz\",\"rb\"],\"env\":[{},{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"iuasfgq\",\"name\":\"cyhfaimqvdru\",\"command\":[\"gyfpeoehgfmqmsk\",\"ixvlz\",\"xplhpeva\",\"yntvzjyielbq\"],\"args\":[\"bqvknmpecqxgiq\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"bn\",\"name\":\"stlpwqp\",\"command\":[\"jkht\",\"psvyouweuiyxfw\",\"ztsm\"],\"args\":[\"evyllznfhkqyt\"],\"env\":[{},{},{}],\"resources\":{}},{\"image\":\"opgfzdgjfcy\",\"name\":\"svloyyhigq\",\"command\":[\"uqw\",\"ajquzxpixhyoi\"],\"args\":[\"dbgsosc\"],\"env\":[{},{},{},{}],\"resources\":{}}]},\"detailedStatus\":{\"replicas\":[{\"name\":\"ennmf\",\"containers\":[{},{},{},{}]},{\"name\":\"nrtekw\",\"containers\":[{}]},{\"name\":\"ro\",\"containers\":[{},{},{},{}]},{\"name\":\"d\",\"containers\":[{},{}]}]}}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobExecution response = manager.resourceProviders() - .jobExecutionWithResponse("fedsbgz", "ncoinmphymc", "i", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ltvdhqnufbx", response.name()); - Assertions.assertEquals("iibntojo", response.id()); - Assertions.assertEquals("nybydhuihaouwud", response.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T08:57:31Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:13:13Z"), response.endTime()); - Assertions.assertEquals("umo", response.template().containers().get(0).image()); - Assertions.assertEquals("ircamqprlo", response.template().containers().get(0).name()); - Assertions.assertEquals("gejcvjkjyczc", response.template().containers().get(0).command().get(0)); - Assertions.assertEquals("gqb", response.template().containers().get(0).args().get(0)); - Assertions.assertEquals("iuasfgq", response.template().initContainers().get(0).image()); - Assertions.assertEquals("cyhfaimqvdru", response.template().initContainers().get(0).name()); - Assertions.assertEquals("gyfpeoehgfmqmsk", response.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("bqvknmpecqxgiq", response.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals("ennmf", response.detailedStatus().replicas().get(0).name()); - } -} 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 f4c894a1fecda..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; - -public final class RevisionCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RevisionCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-25T16:08:34Z\",\"lastActiveTime\":\"2021-05-08T04:39:02Z\",\"fqdn\":\"ipifhpfeoajvg\",\"template\":{\"revisionSuffix\":\"xjcsheafidltu\",\"terminationGracePeriodSeconds\":8187666305787624959,\"initContainers\":[{}],\"containers\":[{},{},{}],\"scale\":{\"minReplicas\":240183027,\"maxReplicas\":1632871841,\"cooldownPeriod\":1883095042,\"pollingInterval\":84921922,\"rules\":[{},{},{},{}]},\"volumes\":[{},{},{}],\"serviceBinds\":[{},{},{}]},\"active\":false,\"replicas\":592289991,\"trafficWeight\":756597053,\"provisioningError\":\"ucb\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioned\",\"runningState\":\"Running\"},\"id\":\"mcwsldrizetpwb\",\"name\":\"a\",\"type\":\"llibphbqzmizak\"},{\"properties\":{\"createdTime\":\"2021-02-12T00:07:30Z\",\"lastActiveTime\":\"2021-02-11T14:59:40Z\",\"fqdn\":\"dnjzh\",\"template\":{\"revisionSuffix\":\"ylhjlm\",\"terminationGracePeriodSeconds\":1077522990830391189,\"initContainers\":[{},{}],\"containers\":[{},{}],\"scale\":{\"minReplicas\":1631755461,\"maxReplicas\":1003988498,\"cooldownPeriod\":596523417,\"pollingInterval\":608923593,\"rules\":[{},{},{},{}]},\"volumes\":[{},{}],\"serviceBinds\":[{},{},{},{}]},\"active\":true,\"replicas\":1672946681,\"trafficWeight\":2018313749,\"provisioningError\":\"xdza\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\",\"runningState\":\"Failed\"},\"id\":\"uufuz\",\"name\":\"oyjathwtzol\",\"type\":\"a\"}],\"nextLink\":\"wm\"}") - .toObject(RevisionCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionCollection model - = new RevisionCollection().withValue(Arrays.asList(new RevisionInner(), new RevisionInner())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeDotnetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeDotnetTests.java deleted file mode 100644 index b50e3a2d8b7ea..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeDotnetTests.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.RuntimeDotnet; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeDotnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeDotnet model - = BinaryData.fromString("{\"autoConfigureDataProtection\":true}").toObject(RuntimeDotnet.class); - Assertions.assertEquals(true, model.autoConfigureDataProtection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeDotnet model = new RuntimeDotnet().withAutoConfigureDataProtection(true); - model = BinaryData.fromObject(model).toObject(RuntimeDotnet.class); - Assertions.assertEquals(true, model.autoConfigureDataProtection()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.java deleted file mode 100644 index c69d8d7cd0f50..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.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.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeJavaAgentLoggingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeJavaAgentLogging model = BinaryData.fromString( - "{\"loggerSettings\":[{\"logger\":\"kzbzkdvncjabudu\",\"level\":\"debug\"},{\"logger\":\"kakmokzh\",\"level\":\"debug\"}]}") - .toObject(RuntimeJavaAgentLogging.class); - Assertions.assertEquals("kzbzkdvncjabudu", model.loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.DEBUG, model.loggerSettings().get(0).level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeJavaAgentLogging model = new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("kzbzkdvncjabudu").withLevel(Level.DEBUG), - new LoggerSetting().withLogger("kakmokzh").withLevel(Level.DEBUG))); - model = BinaryData.fromObject(model).toObject(RuntimeJavaAgentLogging.class); - Assertions.assertEquals("kzbzkdvncjabudu", model.loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.DEBUG, model.loggerSettings().get(0).level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.java deleted file mode 100644 index 172e7eae5d555..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.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.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeJavaAgentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeJavaAgent model = BinaryData.fromString( - "{\"enabled\":true,\"logging\":{\"loggerSettings\":[{\"logger\":\"jorwkqnyhgbij\",\"level\":\"warn\"},{\"logger\":\"ivfxzsjabibsyst\",\"level\":\"trace\"},{\"logger\":\"fsdjpvkvp\",\"level\":\"error\"}]}}") - .toObject(RuntimeJavaAgent.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jorwkqnyhgbij", model.logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.logging().loggerSettings().get(0).level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeJavaAgent model = new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("jorwkqnyhgbij").withLevel(Level.WARN), - new LoggerSetting().withLogger("ivfxzsjabibsyst").withLevel(Level.TRACE), - new LoggerSetting().withLogger("fsdjpvkvp").withLevel(Level.ERROR)))); - model = BinaryData.fromObject(model).toObject(RuntimeJavaAgent.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jorwkqnyhgbij", model.logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.logging().loggerSettings().get(0).level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.java deleted file mode 100644 index b17937e90348a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.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.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeJavaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeJava model = BinaryData.fromString( - "{\"enableMetrics\":true,\"javaAgent\":{\"enabled\":false,\"logging\":{\"loggerSettings\":[{\"logger\":\"wm\",\"level\":\"info\"}]}}}") - .toObject(RuntimeJava.class); - Assertions.assertEquals(true, model.enableMetrics()); - Assertions.assertEquals(false, model.javaAgent().enabled()); - Assertions.assertEquals("wm", model.javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.INFO, model.javaAgent().logging().loggerSettings().get(0).level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeJava model = new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(false) - .withLogging(new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("wm").withLevel(Level.INFO))))); - model = BinaryData.fromObject(model).toObject(RuntimeJava.class); - Assertions.assertEquals(true, model.enableMetrics()); - Assertions.assertEquals(false, model.javaAgent().enabled()); - Assertions.assertEquals("wm", model.javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.INFO, model.javaAgent().logging().loggerSettings().get(0).level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.java deleted file mode 100644 index 2b2ccda78d1e6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.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.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.Runtime; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; -import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Runtime model = BinaryData.fromString( - "{\"java\":{\"enableMetrics\":true,\"javaAgent\":{\"enabled\":true,\"logging\":{\"loggerSettings\":[{\"logger\":\"g\",\"level\":\"warn\"},{\"logger\":\"fvpdbo\",\"level\":\"warn\"},{\"logger\":\"cizsjqlhkrribdei\",\"level\":\"debug\"}]}}},\"dotnet\":{\"autoConfigureDataProtection\":false}}") - .toObject(Runtime.class); - Assertions.assertEquals(true, model.java().enableMetrics()); - Assertions.assertEquals(true, model.java().javaAgent().enabled()); - Assertions.assertEquals("g", model.java().javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.java().javaAgent().logging().loggerSettings().get(0).level()); - Assertions.assertEquals(false, model.dotnet().autoConfigureDataProtection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Runtime model = new Runtime() - .withJava(new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("g").withLevel(Level.WARN), - new LoggerSetting().withLogger("fvpdbo").withLevel(Level.WARN), - new LoggerSetting().withLogger("cizsjqlhkrribdei").withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(false)); - model = BinaryData.fromObject(model).toObject(Runtime.class); - Assertions.assertEquals(true, model.java().enableMetrics()); - Assertions.assertEquals(true, model.java().javaAgent().enabled()); - Assertions.assertEquals("g", model.java().javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.java().javaAgent().logging().loggerSettings().get(0).level()); - Assertions.assertEquals(false, model.dotnet().autoConfigureDataProtection()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.java deleted file mode 100644 index 5c94dc4897753..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.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.ScaleConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleConfiguration model - = BinaryData.fromString("{\"maxConcurrentSessions\":1887957925,\"readySessionInstances\":666535336}") - .toObject(ScaleConfiguration.class); - Assertions.assertEquals(1887957925, model.maxConcurrentSessions()); - Assertions.assertEquals(666535336, model.readySessionInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleConfiguration model - = new ScaleConfiguration().withMaxConcurrentSessions(1887957925).withReadySessionInstances(666535336); - model = BinaryData.fromObject(model).toObject(ScaleConfiguration.class); - Assertions.assertEquals(1887957925, model.maxConcurrentSessions()); - Assertions.assertEquals(666535336, model.readySessionInstances()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.java deleted file mode 100644 index 2d9636e6e4c7e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.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.ScgRoute; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScgRouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScgRoute model = BinaryData.fromString( - "{\"id\":\"rbhmpfulubef\",\"uri\":\"ybpmf\",\"predicates\":[\"nunmpzkrv\",\"yifkdschlzvf\"],\"filters\":[\"nkjjwgcwnphbkgf\",\"rtogmhmj\",\"jsc\",\"fp\"],\"order\":4170299053453455281}") - .toObject(ScgRoute.class); - Assertions.assertEquals("rbhmpfulubef", model.id()); - Assertions.assertEquals("ybpmf", model.uri()); - Assertions.assertEquals("nunmpzkrv", model.predicates().get(0)); - Assertions.assertEquals("nkjjwgcwnphbkgf", model.filters().get(0)); - Assertions.assertEquals(4170299053453455281L, model.order()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScgRoute model = new ScgRoute().withId("rbhmpfulubef") - .withUri("ybpmf") - .withPredicates(Arrays.asList("nunmpzkrv", "yifkdschlzvf")) - .withFilters(Arrays.asList("nkjjwgcwnphbkgf", "rtogmhmj", "jsc", "fp")) - .withOrder(4170299053453455281L); - model = BinaryData.fromObject(model).toObject(ScgRoute.class); - Assertions.assertEquals("rbhmpfulubef", model.id()); - Assertions.assertEquals("ybpmf", model.uri()); - Assertions.assertEquals("nunmpzkrv", model.predicates().get(0)); - Assertions.assertEquals("nkjjwgcwnphbkgf", model.filters().get(0)); - Assertions.assertEquals(4170299053453455281L, model.order()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java deleted file mode 100644 index be1ca258d6651..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Service; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Service model = BinaryData.fromString("{\"type\":\"wqlgzrf\"}").toObject(Service.class); - Assertions.assertEquals("wqlgzrf", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Service model = new Service().withType("wqlgzrf"); - model = BinaryData.fromObject(model).toObject(Service.class); - Assertions.assertEquals("wqlgzrf", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionContainerResourcesTests.java deleted file mode 100644 index dbc14af3db00c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionContainerResourcesTests.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.SessionContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class SessionContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionContainerResources model - = BinaryData.fromString("{\"cpu\":23.363409382810364,\"memory\":\"bjuyrsrziuctixg\"}") - .toObject(SessionContainerResources.class); - Assertions.assertEquals(23.363409382810364D, model.cpu()); - Assertions.assertEquals("bjuyrsrziuctixg", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionContainerResources model - = new SessionContainerResources().withCpu(23.363409382810364D).withMemory("bjuyrsrziuctixg"); - model = BinaryData.fromObject(model).toObject(SessionContainerResources.class); - Assertions.assertEquals(23.363409382810364D, model.cpu()); - Assertions.assertEquals("bjuyrsrziuctixg", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java deleted file mode 100644 index eb7c8bc7dcc47..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.SessionIngress; -import org.junit.jupiter.api.Assertions; - -public final class SessionIngressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionIngress model = BinaryData.fromString("{\"targetPort\":1033941226}").toObject(SessionIngress.class); - Assertions.assertEquals(1033941226, model.targetPort()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionIngress model = new SessionIngress().withTargetPort(1033941226); - model = BinaryData.fromObject(model).toObject(SessionIngress.class); - Assertions.assertEquals(1033941226, model.targetPort()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.java deleted file mode 100644 index 4686fce9724b4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.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.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; -import org.junit.jupiter.api.Assertions; - -public final class SessionNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionNetworkConfiguration model - = BinaryData.fromString("{\"status\":\"EgressEnabled\"}").toObject(SessionNetworkConfiguration.class); - Assertions.assertEquals(SessionNetworkStatus.EGRESS_ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionNetworkConfiguration model - = new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED); - model = BinaryData.fromObject(model).toObject(SessionNetworkConfiguration.class); - Assertions.assertEquals(SessionNetworkStatus.EGRESS_ENABLED, model.status()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.java deleted file mode 100644 index 6d7771b7d6b98..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.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.SessionPoolSecret; -import org.junit.jupiter.api.Assertions; - -public final class SessionPoolSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionPoolSecret model - = BinaryData.fromString("{\"name\":\"pemtuoqu\",\"value\":\"yegq\"}").toObject(SessionPoolSecret.class); - Assertions.assertEquals("pemtuoqu", model.name()); - Assertions.assertEquals("yegq", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionPoolSecret model = new SessionPoolSecret().withName("pemtuoqu").withValue("yegq"); - model = BinaryData.fromObject(model).toObject(SessionPoolSecret.class); - Assertions.assertEquals("pemtuoqu", model.name()); - Assertions.assertEquals("yegq", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java deleted file mode 100644 index 50f99a1228b35..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringBootAdminComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringBootAdminComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringBootAdmin\",\"ingress\":{\"fqdn\":\"kvzwydw\"},\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"gkskjivbss\",\"value\":\"jqf\"},{\"propertyName\":\"peexpgeumilhwuit\",\"value\":\"exyionofninbd\"},{\"propertyName\":\"s\",\"value\":\"wqqrsmpcbbprtuga\"}],\"scale\":{\"minReplicas\":859644110,\"maxReplicas\":1675076969},\"serviceBinds\":[{\"name\":\"vm\",\"serviceId\":\"gd\"},{\"name\":\"bfcmkrfts\",\"serviceId\":\"wjjxsgm\"},{\"name\":\"wvif\",\"serviceId\":\"kecifhocjxwklo\"},{\"name\":\"rvtxvcmufunlc\",\"serviceId\":\"xvi\"}]}") - .toObject(SpringBootAdminComponent.class); - Assertions.assertEquals("gkskjivbss", model.configurations().get(0).propertyName()); - Assertions.assertEquals("jqf", model.configurations().get(0).value()); - Assertions.assertEquals(859644110, model.scale().minReplicas()); - Assertions.assertEquals(1675076969, model.scale().maxReplicas()); - Assertions.assertEquals("vm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("gd", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringBootAdminComponent model = new SpringBootAdminComponent() - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("gkskjivbss").withValue("jqf"), - new JavaComponentConfigurationProperty().withPropertyName("peexpgeumilhwuit") - .withValue("exyionofninbd"), - new JavaComponentConfigurationProperty().withPropertyName("s").withValue("wqqrsmpcbbprtuga"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(859644110).withMaxReplicas(1675076969)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("vm").withServiceId("gd"), - new JavaComponentServiceBind().withName("bfcmkrfts").withServiceId("wjjxsgm"), - new JavaComponentServiceBind().withName("wvif").withServiceId("kecifhocjxwklo"), - new JavaComponentServiceBind().withName("rvtxvcmufunlc").withServiceId("xvi"))) - .withIngress(new JavaComponentIngress()); - model = BinaryData.fromObject(model).toObject(SpringBootAdminComponent.class); - Assertions.assertEquals("gkskjivbss", model.configurations().get(0).propertyName()); - Assertions.assertEquals("jqf", model.configurations().get(0).value()); - Assertions.assertEquals(859644110, model.scale().minReplicas()); - Assertions.assertEquals(1675076969, model.scale().maxReplicas()); - Assertions.assertEquals("vm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("gd", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java deleted file mode 100644 index c88fcabe87bc4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringCloudConfigComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringCloudConfigComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringCloudConfigComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"ekraokqkbudbt\",\"value\":\"okbavlyttaak\"},{\"propertyName\":\"frkebsmhpd\",\"value\":\"dig\"},{\"propertyName\":\"olekscbctnanqim\",\"value\":\"zxpdcldpkawnsnl\"},{\"propertyName\":\"mouxwksqmudmfco\",\"value\":\"icziuswswjrkb\"}],\"scale\":{\"minReplicas\":1858823351,\"maxReplicas\":1182597783},\"serviceBinds\":[{\"name\":\"yfscyrfwbivqvo\",\"serviceId\":\"uyzwvbhlimbyqecr\"}]}") - .toObject(SpringCloudConfigComponent.class); - Assertions.assertEquals("ekraokqkbudbt", model.configurations().get(0).propertyName()); - Assertions.assertEquals("okbavlyttaak", model.configurations().get(0).value()); - Assertions.assertEquals(1858823351, model.scale().minReplicas()); - Assertions.assertEquals(1182597783, model.scale().maxReplicas()); - Assertions.assertEquals("yfscyrfwbivqvo", model.serviceBinds().get(0).name()); - Assertions.assertEquals("uyzwvbhlimbyqecr", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringCloudConfigComponent model = new SpringCloudConfigComponent().withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("ekraokqkbudbt").withValue("okbavlyttaak"), - new JavaComponentConfigurationProperty().withPropertyName("frkebsmhpd").withValue("dig"), - new JavaComponentConfigurationProperty().withPropertyName("olekscbctnanqim").withValue("zxpdcldpkawnsnl"), - new JavaComponentConfigurationProperty().withPropertyName("mouxwksqmudmfco").withValue("icziuswswjrkb"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1858823351).withMaxReplicas(1182597783)) - .withServiceBinds(Arrays - .asList(new JavaComponentServiceBind().withName("yfscyrfwbivqvo").withServiceId("uyzwvbhlimbyqecr"))); - model = BinaryData.fromObject(model).toObject(SpringCloudConfigComponent.class); - Assertions.assertEquals("ekraokqkbudbt", model.configurations().get(0).propertyName()); - Assertions.assertEquals("okbavlyttaak", model.configurations().get(0).value()); - Assertions.assertEquals(1858823351, model.scale().minReplicas()); - Assertions.assertEquals(1182597783, model.scale().maxReplicas()); - Assertions.assertEquals("yfscyrfwbivqvo", model.serviceBinds().get(0).name()); - Assertions.assertEquals("uyzwvbhlimbyqecr", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java deleted file mode 100644 index 6295fd22da8d4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringCloudEurekaComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringCloudEurekaComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringCloudEurekaComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudEureka\",\"ingress\":{\"fqdn\":\"yyrlhgenu\"},\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"veb\",\"value\":\"szllrzlsmmdqgmi\"},{\"propertyName\":\"pimcqrhn\",\"value\":\"minkl\"},{\"propertyName\":\"xsvtzarhzvqnsqk\",\"value\":\"mbjwzzoslpkyb\"}],\"scale\":{\"minReplicas\":1366421495,\"maxReplicas\":493622397},\"serviceBinds\":[{\"name\":\"jsqjcemqbm\",\"serviceId\":\"vqar\"},{\"name\":\"xuqreblu\",\"serviceId\":\"mbwxsfg\"}]}") - .toObject(SpringCloudEurekaComponent.class); - Assertions.assertEquals("veb", model.configurations().get(0).propertyName()); - Assertions.assertEquals("szllrzlsmmdqgmi", model.configurations().get(0).value()); - Assertions.assertEquals(1366421495, model.scale().minReplicas()); - Assertions.assertEquals(493622397, model.scale().maxReplicas()); - Assertions.assertEquals("jsqjcemqbm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("vqar", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringCloudEurekaComponent model = new SpringCloudEurekaComponent() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("veb").withValue("szllrzlsmmdqgmi"), - new JavaComponentConfigurationProperty().withPropertyName("pimcqrhn").withValue("minkl"), - new JavaComponentConfigurationProperty().withPropertyName("xsvtzarhzvqnsqk") - .withValue("mbjwzzoslpkyb"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1366421495).withMaxReplicas(493622397)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("jsqjcemqbm").withServiceId("vqar"), - new JavaComponentServiceBind().withName("xuqreblu").withServiceId("mbwxsfg"))) - .withIngress(new JavaComponentIngress()); - model = BinaryData.fromObject(model).toObject(SpringCloudEurekaComponent.class); - Assertions.assertEquals("veb", model.configurations().get(0).propertyName()); - Assertions.assertEquals("szllrzlsmmdqgmi", model.configurations().get(0).value()); - Assertions.assertEquals(1366421495, model.scale().minReplicas()); - Assertions.assertEquals(493622397, model.scale().maxReplicas()); - Assertions.assertEquals("jsqjcemqbm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("vqar", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.java deleted file mode 100644 index 3601782d9f7bf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.ScgRoute; -import com.azure.resourcemanager.appcontainers.models.SpringCloudGatewayComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringCloudGatewayComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringCloudGatewayComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudGateway\",\"ingress\":{\"fqdn\":\"xifvqnrxtmbpjpt\"},\"springCloudGatewayRoutes\":[{\"id\":\"jhrsidqpxlb\",\"uri\":\"pakftngatwm\",\"predicates\":[\"u\",\"rymdwmf\"],\"filters\":[\"y\",\"vjqdvdwkq\",\"ldrlefgnaavua\",\"n\"],\"order\":1685167136810834762},{\"id\":\"outnpdctuhspfefy\",\"uri\":\"hduyeuyldph\",\"predicates\":[\"bkcgsuthhllnm\",\"y\",\"efxexlf\",\"i\"],\"filters\":[\"tjrrlkmds\",\"jhhxdlajf\"],\"order\":1421309624350000860},{\"id\":\"scv\",\"uri\":\"lxlhuavkrm\",\"predicates\":[\"yjmkxettc\",\"lojfkqidnqto\",\"xjhqxcsqhtkb\",\"nqlrng\"],\"filters\":[\"biipsnawwlqkznx\",\"hllxricctkw\",\"uqqoaj\",\"eiyglesrwvaexhdc\"],\"order\":6015888492629008209},{\"id\":\"qnkbrupobehdm\",\"uri\":\"jzacvumepjpbibn\",\"predicates\":[\"hep\",\"fexleqirccjcly\",\"cgxvrpj\",\"vczuodacpune\"],\"filters\":[\"pdjxqeskoynu\",\"ylpckaewsedv\",\"skwxe\"],\"order\":2622213002534691170}],\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"hctmjtsgh\",\"value\":\"c\"},{\"propertyName\":\"pzarpzeqacdld\",\"value\":\"mpypefcpczshnuq\"},{\"propertyName\":\"aizu\",\"value\":\"kh\"}],\"scale\":{\"minReplicas\":1288045967,\"maxReplicas\":529640941},\"serviceBinds\":[{\"name\":\"tvtv\",\"serviceId\":\"w\"}]}") - .toObject(SpringCloudGatewayComponent.class); - Assertions.assertEquals("hctmjtsgh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("c", model.configurations().get(0).value()); - Assertions.assertEquals(1288045967, model.scale().minReplicas()); - Assertions.assertEquals(529640941, model.scale().maxReplicas()); - Assertions.assertEquals("tvtv", model.serviceBinds().get(0).name()); - Assertions.assertEquals("w", model.serviceBinds().get(0).serviceId()); - Assertions.assertEquals("jhrsidqpxlb", model.springCloudGatewayRoutes().get(0).id()); - Assertions.assertEquals("pakftngatwm", model.springCloudGatewayRoutes().get(0).uri()); - Assertions.assertEquals("u", model.springCloudGatewayRoutes().get(0).predicates().get(0)); - Assertions.assertEquals("y", model.springCloudGatewayRoutes().get(0).filters().get(0)); - Assertions.assertEquals(1685167136810834762L, model.springCloudGatewayRoutes().get(0).order()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringCloudGatewayComponent model = new SpringCloudGatewayComponent() - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("hctmjtsgh").withValue("c"), - new JavaComponentConfigurationProperty().withPropertyName("pzarpzeqacdld") - .withValue("mpypefcpczshnuq"), - new JavaComponentConfigurationProperty().withPropertyName("aizu").withValue("kh"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1288045967).withMaxReplicas(529640941)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("tvtv").withServiceId("w"))) - .withIngress(new JavaComponentIngress()) - .withSpringCloudGatewayRoutes(Arrays.asList( - new ScgRoute().withId("jhrsidqpxlb") - .withUri("pakftngatwm") - .withPredicates(Arrays.asList("u", "rymdwmf")) - .withFilters(Arrays.asList("y", "vjqdvdwkq", "ldrlefgnaavua", "n")) - .withOrder(1685167136810834762L), - new ScgRoute().withId("outnpdctuhspfefy") - .withUri("hduyeuyldph") - .withPredicates(Arrays.asList("bkcgsuthhllnm", "y", "efxexlf", "i")) - .withFilters(Arrays.asList("tjrrlkmds", "jhhxdlajf")) - .withOrder(1421309624350000860L), - new ScgRoute().withId("scv") - .withUri("lxlhuavkrm") - .withPredicates(Arrays.asList("yjmkxettc", "lojfkqidnqto", "xjhqxcsqhtkb", "nqlrng")) - .withFilters(Arrays.asList("biipsnawwlqkznx", "hllxricctkw", "uqqoaj", "eiyglesrwvaexhdc")) - .withOrder(6015888492629008209L), - new ScgRoute().withId("qnkbrupobehdm") - .withUri("jzacvumepjpbibn") - .withPredicates(Arrays.asList("hep", "fexleqirccjcly", "cgxvrpj", "vczuodacpune")) - .withFilters(Arrays.asList("pdjxqeskoynu", "ylpckaewsedv", "skwxe")) - .withOrder(2622213002534691170L))); - model = BinaryData.fromObject(model).toObject(SpringCloudGatewayComponent.class); - Assertions.assertEquals("hctmjtsgh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("c", model.configurations().get(0).value()); - Assertions.assertEquals(1288045967, model.scale().minReplicas()); - Assertions.assertEquals(529640941, model.scale().maxReplicas()); - Assertions.assertEquals("tvtv", model.serviceBinds().get(0).name()); - Assertions.assertEquals("w", model.serviceBinds().get(0).serviceId()); - Assertions.assertEquals("jhrsidqpxlb", model.springCloudGatewayRoutes().get(0).id()); - Assertions.assertEquals("pakftngatwm", model.springCloudGatewayRoutes().get(0).uri()); - Assertions.assertEquals("u", model.springCloudGatewayRoutes().get(0).predicates().get(0)); - Assertions.assertEquals("y", model.springCloudGatewayRoutes().get(0).filters().get(0)); - Assertions.assertEquals(1685167136810834762L, model.springCloudGatewayRoutes().get(0).order()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java deleted file mode 100644 index 525f953e5e6e7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class TcpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpConnectionPool model - = BinaryData.fromString("{\"maxConnections\":171596164}").toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpConnectionPool model = new TcpConnectionPool().withMaxConnections(171596164); - model = BinaryData.fromObject(model).toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java deleted file mode 100644 index aa0e1f0e20192..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TcpRetryPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpRetryPolicy model - = BinaryData.fromString("{\"maxConnectAttempts\":56034680}").toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpRetryPolicy model = new TcpRetryPolicy().withMaxConnectAttempts(56034680); - model = BinaryData.fromObject(model).toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java deleted file mode 100644 index 22186455269fb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TimeoutPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TimeoutPolicy model = BinaryData - .fromString("{\"responseTimeoutInSeconds\":2068674986,\"connectionTimeoutInSeconds\":974822937}") - .toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeoutPolicy model - = new TimeoutPolicy().withResponseTimeoutInSeconds(2068674986).withConnectionTimeoutInSeconds(974822937); - model = BinaryData.fromObject(model).toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java deleted file mode 100644 index e2c19cb8f5f82..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.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.TracesConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TracesConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TracesConfiguration model - = BinaryData.fromString("{\"includeDapr\":true,\"destinations\":[\"cdxfzzzwyjafitl\",\"guyn\",\"chl\"]}") - .toObject(TracesConfiguration.class); - Assertions.assertEquals(true, model.includeDapr()); - Assertions.assertEquals("cdxfzzzwyjafitl", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TracesConfiguration model = new TracesConfiguration().withIncludeDapr(true) - .withDestinations(Arrays.asList("cdxfzzzwyjafitl", "guyn", "chl")); - model = BinaryData.fromObject(model).toObject(TracesConfiguration.class); - Assertions.assertEquals(true, model.includeDapr()); - Assertions.assertEquals("cdxfzzzwyjafitl", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java deleted file mode 100644 index 9b0e9c8a0b8cd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.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.TrafficWeight; -import org.junit.jupiter.api.Assertions; - -public final class TrafficWeightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrafficWeight model = BinaryData.fromString( - "{\"revisionName\":\"cngqqmoakufgmjz\",\"weight\":1463483261,\"latestRevision\":false,\"label\":\"twaenuuzko\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("cngqqmoakufgmjz", model.revisionName()); - Assertions.assertEquals(1463483261, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("twaenuuzko", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = new TrafficWeight().withRevisionName("cngqqmoakufgmjz") - .withWeight(1463483261) - .withLatestRevision(false) - .withLabel("twaenuuzko"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("cngqqmoakufgmjz", model.revisionName()); - Assertions.assertEquals(1463483261, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("twaenuuzko", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java deleted file mode 100644 index 6edb251cc04ee..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.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.UsageInner; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = BinaryData.fromString( - "{\"currentValue\":89.70679,\"limit\":84.81147,\"name\":{\"value\":\"ycs\",\"localizedValue\":\"zyvoaqa\"}}") - .toObject(UsageInner.class); - Assertions.assertEquals(89.70679f, model.currentValue()); - Assertions.assertEquals(84.81147f, model.limit()); - Assertions.assertEquals("ycs", model.name().value()); - Assertions.assertEquals("zyvoaqa", model.name().localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner().withCurrentValue(89.70679f) - .withLimit(84.81147f) - .withName(new UsageName().withValue("ycs").withLocalizedValue("zyvoaqa")); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - Assertions.assertEquals(89.70679f, model.currentValue()); - Assertions.assertEquals(84.81147f, model.limit()); - Assertions.assertEquals("ycs", model.name().value()); - Assertions.assertEquals("zyvoaqa", model.name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java deleted file mode 100644 index f9b5630516357..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model - = BinaryData.fromString("{\"value\":\"vehzp\",\"localizedValue\":\"mk\"}").toObject(UsageName.class); - Assertions.assertEquals("vehzp", model.value()); - Assertions.assertEquals("mk", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName().withValue("vehzp").withLocalizedValue("mk"); - model = BinaryData.fromObject(model).toObject(UsageName.class); - Assertions.assertEquals("vehzp", model.value()); - Assertions.assertEquals("mk", model.localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java deleted file mode 100644 index a831bcbf57097..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Usage; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"currentValue\":55.734398,\"limit\":3.051567,\"name\":{\"value\":\"qbqxfbbigcfd\",\"localizedValue\":\"fxnfbm\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().list("qldqabn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(55.734398f, response.iterator().next().currentValue()); - Assertions.assertEquals(3.051567f, response.iterator().next().limit()); - Assertions.assertEquals("qbqxfbbigcfd", response.iterator().next().name().value()); - Assertions.assertEquals("fxnfbm", response.iterator().next().name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index c23c32492ae20..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"2a01a815-0c82-4264-9572-64890cd5a3ec\",\"clientId\":\"e22fb5da-0dc2-4e42-a85f-75958f373363\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java deleted file mode 100644 index ebfd835a8ec65..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.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.VnetConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VnetConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VnetConfiguration model = BinaryData.fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"pubntnbatz\",\"dockerBridgeCidr\":\"qs\",\"platformReservedCidr\":\"saaelca\",\"platformReservedDnsIP\":\"cjuhplrvkm\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("pubntnbatz", model.infrastructureSubnetId()); - Assertions.assertEquals("qs", model.dockerBridgeCidr()); - Assertions.assertEquals("saaelca", model.platformReservedCidr()); - Assertions.assertEquals("cjuhplrvkm", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = new VnetConfiguration().withInternal(true) - .withInfrastructureSubnetId("pubntnbatz") - .withDockerBridgeCidr("qs") - .withPlatformReservedCidr("saaelca") - .withPlatformReservedDnsIp("cjuhplrvkm"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("pubntnbatz", model.infrastructureSubnetId()); - Assertions.assertEquals("qs", model.dockerBridgeCidr()); - Assertions.assertEquals("saaelca", model.platformReservedCidr()); - Assertions.assertEquals("cjuhplrvkm", model.platformReservedDnsIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java deleted file mode 100644 index e3efd088bbf04..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; - -public final class VolumeMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeMount model - = BinaryData.fromString("{\"volumeName\":\"kbwcc\",\"mountPath\":\"jvcdwxlpqekf\",\"subPath\":\"khtj\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("kbwcc", model.volumeName()); - Assertions.assertEquals("jvcdwxlpqekf", model.mountPath()); - Assertions.assertEquals("khtj", model.subPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model = new VolumeMount().withVolumeName("kbwcc").withMountPath("jvcdwxlpqekf").withSubPath("khtj"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("kbwcc", model.volumeName()); - Assertions.assertEquals("jvcdwxlpqekf", model.mountPath()); - Assertions.assertEquals("khtj", model.subPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkflowArtifactsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkflowArtifactsTests.java deleted file mode 100644 index ebeb3ad4e1cd7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkflowArtifactsTests.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.WorkflowArtifacts; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkflowArtifactsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkflowArtifacts model = BinaryData.fromString( - "{\"appSettings\":\"datavhycvdimwrzregzg\",\"files\":\"datafutrwpweryekzkd\",\"filesToDelete\":[\"ottaw\",\"yos\"]}") - .toObject(WorkflowArtifacts.class); - Assertions.assertEquals("ottaw", model.filesToDelete().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkflowArtifacts model = new WorkflowArtifacts().withAppSettings("datavhycvdimwrzregzg") - .withFiles("datafutrwpweryekzkd") - .withFilesToDelete(Arrays.asList("ottaw", "yos")); - model = BinaryData.fromObject(model).toObject(WorkflowArtifacts.class); - Assertions.assertEquals("ottaw", model.filesToDelete().get(0)); - } -} 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 5be26fb53d93e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":395266959,\"maximumCount\":280610276,\"currentCount\":1048039893},\"id\":\"cunnuzdqumoenodn\",\"name\":\"ienhqhskndnelq\",\"type\":\"aadl\"},{\"properties\":{\"minimumCount\":911130448,\"maximumCount\":1742378408,\"currentCount\":125911630},\"id\":\"yopetxivc\",\"name\":\"rl\",\"type\":\"xnucaephblkwqp\"},{\"properties\":{\"minimumCount\":877535846,\"maximumCount\":1982955476,\"currentCount\":876148319},\"id\":\"jbc\",\"name\":\"vivuzqymtuowo\",\"type\":\"tgitsqhzvbrzc\"}],\"nextLink\":\"anfzndscxmxeatk\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(395266959, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(280610276, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(1048039893, model.value().get(0).properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesCollection model = new WorkloadProfileStatesCollection().withValue(Arrays.asList( - new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(395266959) - .withMaximumCount(280610276) - .withCurrentCount(1048039893)), - new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(911130448) - .withMaximumCount(1742378408) - .withCurrentCount(125911630)), - new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(877535846) - .withMaximumCount(1982955476) - .withCurrentCount(876148319)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(395266959, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(280610276, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(1048039893, 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 bc45e2c1f8dfd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.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.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesInner model = BinaryData.fromString( - "{\"properties\":{\"minimumCount\":1574361412,\"maximumCount\":1879583811,\"currentCount\":1943838526},\"id\":\"ibqbnaomhjrm\",\"name\":\"u\",\"type\":\"maxljalfihcj\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1574361412, model.properties().minimumCount()); - Assertions.assertEquals(1879583811, model.properties().maximumCount()); - Assertions.assertEquals(1943838526, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model = new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(1574361412) - .withMaximumCount(1879583811) - .withCurrentCount(1943838526)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1574361412, model.properties().minimumCount()); - Assertions.assertEquals(1879583811, model.properties().maximumCount()); - Assertions.assertEquals(1943838526, 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 235993e005a0b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.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.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesProperties model = BinaryData - .fromString("{\"minimumCount\":491283548,\"maximumCount\":619212156,\"currentCount\":367738618}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(491283548, model.minimumCount()); - Assertions.assertEquals(619212156, model.maximumCount()); - Assertions.assertEquals(367738618, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = new WorkloadProfileStatesProperties().withMinimumCount(491283548) - .withMaximumCount(619212156) - .withCurrentCount(367738618); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(491283548, model.minimumCount()); - Assertions.assertEquals(619212156, model.maximumCount()); - Assertions.assertEquals(367738618, 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 f58bd8de9066c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.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.WorkloadProfile; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfile model = BinaryData.fromString( - "{\"name\":\"zragpg\",\"enableFips\":false,\"workloadProfileType\":\"t\",\"minimumCount\":737806246,\"maximumCount\":135335326}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("zragpg", model.name()); - Assertions.assertEquals(false, model.enableFips()); - Assertions.assertEquals("t", model.workloadProfileType()); - Assertions.assertEquals(737806246, model.minimumCount()); - Assertions.assertEquals(135335326, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = new WorkloadProfile().withName("zragpg") - .withEnableFips(false) - .withWorkloadProfileType("t") - .withMinimumCount(737806246) - .withMaximumCount(135335326); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("zragpg", model.name()); - Assertions.assertEquals(false, model.enableFips()); - Assertions.assertEquals("t", model.workloadProfileType()); - Assertions.assertEquals(737806246, model.minimumCount()); - Assertions.assertEquals(135335326, model.maximumCount()); - } -}